diff options
author | Matteo Raso <matteo_luigi_raso@protonmail.com> | 2022-11-25 00:28:35 -0500 |
---|---|---|
committer | Matteo Raso <matteo_luigi_raso@protonmail.com> | 2022-11-25 00:28:35 -0500 |
commit | 3b9c49e5bb47a979fedb151e36f4e3a00724b096 (patch) | |
tree | 97db8178d308d4ad1aeff776951920d8631d2ece /numpy/polynomial/_polybase.py | |
parent | 6aacc5167983d7c6f8689d7039294f2fc0d5f5fb (diff) | |
download | numpy-3b9c49e5bb47a979fedb151e36f4e3a00724b096.tar.gz |
BUG: Polynomials now copy properly (#22669)
On line 502, self.symbol.copy() was called, which
causes an AttributeError, since self.symbol is a
string, so it doesn't have a copy() method. To fix
it, I simply removed the copy() and directly assigned
the string.
Diffstat (limited to 'numpy/polynomial/_polybase.py')
-rw-r--r-- | numpy/polynomial/_polybase.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/polynomial/_polybase.py b/numpy/polynomial/_polybase.py index 9674dee0b..3bea91dd2 100644 --- a/numpy/polynomial/_polybase.py +++ b/numpy/polynomial/_polybase.py @@ -499,7 +499,7 @@ class ABCPolyBase(abc.ABC): ret['coef'] = self.coef.copy() ret['domain'] = self.domain.copy() ret['window'] = self.window.copy() - ret['symbol'] = self.symbol.copy() + ret['symbol'] = self.symbol return ret def __setstate__(self, dict): |