
Oct. 22, 2010
3:51 p.m.
I'm subclassing numpy.polynomial.Polynomial. So far it works well. One question on inplace changes Is it safe to change coef directly without creating a new instance? I'm not trying to change anything else in the polynomial, just for example pad, truncate or invert the coef inplace, e.g def pad(self, maxlag): self.coef = np.r_[self.coef, np.zeros(maxlag - len(self.coef))] Currently, I have rewritten this to return a new instance. Thanks, Josef