-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
polyval turns masked array into array (Trac #1884) #2477
Labels
Comments
Attachment added by trac user mauro on 2011-06-28: masked_and_polyfit.py |
Using |
sudheesh001
added a commit
to sudheesh001/numpy
that referenced
this issue
Dec 27, 2015
jhereth
pushed a commit
to jhereth/numpy
that referenced
this issue
Oct 21, 2018
This fix will preserve subtypes of ndarray when given as input (x) to the polyval function. In particular, the results for masked values of a masked array will be masked. Fixes numpy#2477.
I found the abandoned PR #6891 by @sudheesh001 and followed the review from @ahaldane. #12239 is the result. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original ticket http://projects.scipy.org/numpy/ticket/1884 on 2011-06-28 by trac user mauro, assigned to @pierregm.
When using a masked array as input for polyval, then the return is an array. I think it should be a masked array again (or at least document it that it is not).
The fix seems easy, remove the line
x = NX.asarray(x)
from np.lib.polyval. But presumably that line is there for a reason...
The text was updated successfully, but these errors were encountered: