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
Cannot get apply_over_axes to work on masked arrays. Have tried both np.apply_over_axes and np.ma.apply_over_axes.
x = np.array([1,2,3])
x = np.masked_where(x==3, x)
np.ma.apply_over_axes(np.ma.mean, x, axes=(0))
array([ 2. ])
This should be 1.5. Have tried all combinations of np.ma and regular np functions. Can't get it to work. (Obviously the example given does not require apply_over_axes, but used it for simplicity.)
Using numpy version 1.8
The text was updated successfully, but these errors were encountered:
Cannot get apply_over_axes to work on masked arrays. Have tried both np.apply_over_axes and np.ma.apply_over_axes.
array([ 2. ])
This should be 1.5. Have tried all combinations of np.ma and regular np functions. Can't get it to work. (Obviously the example given does not require apply_over_axes, but used it for simplicity.)
Using numpy version 1.8
The text was updated successfully, but these errors were encountered: