diff options
Diffstat (limited to 'numpy/lib/polynomial.py')
-rw-r--r-- | numpy/lib/polynomial.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/numpy/lib/polynomial.py b/numpy/lib/polynomial.py index f49b7e295..1b13b38a0 100644 --- a/numpy/lib/polynomial.py +++ b/numpy/lib/polynomial.py @@ -1040,8 +1040,14 @@ class poly1d(object): @property def coeffs(self): - """ A copy of the polynomial coefficients """ - return self._coeffs.copy() + """ The polynomial coefficients """ + return self._coeffs + + @coeffs.setter + def coeffs(self, value): + # allowing this makes p.coeffs *= 2 legal + if value is not self._coeffs: + raise AttributeError("Cannot set attribute") @property def variable(self): |