You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>>source=np.ma.masked# comes from user function, could be anything>>>source=np.asanyarray(source) # force to array, so we can try to copy the type>>>outarr=np.zeros((2, 2)) # allocate a raw ndarray for the result>>>bad=source.__array_prepare__(outarr) # prepare that raw array for operations >>>bad.shape
(2, 2)
>>>bad.data.shape
() # uh oh>>>bad.mask.shape
() # spaghettios
Uh oh!
There was an error while loading. Please reload this page.
A somewhat contrived example
Which leads to failures like
This come up when trying to invoke #8441 on masked arrays.
Is this a bug, or an invalid use of
__array_prepare__
?The text was updated successfully, but these errors were encountered: