Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork11k
Open
Description
nanmean
andnanvar
raiseRuntimeWarning
exceptions that are not called by their non-nan counterpart functions.
Reproducing code example:
importnumpyasnptest=np.zeros((2,3,4))test[:,:,1:2]=np.nannp.mean(test,axis=0)# OKnp.nanmean(test,axis=0)# RuntimeWarning: Mean of empty slicenp.var(test,axis=0)# OKnp.nanvar(test,axis=0)# RuntimeWarning: Degrees of freedom <= 0 for slice.
Error message:
RuntimeWarning: Mean of empty slice
RuntimeWarning: Degrees of freedom <= 0 for slice.
Numpy/Python version information:
1.17.2 3.7.4 (default, Aug 13 2019, 15:17:50) [Clang 4.0.1 (tags/RELEASE_401/final)]