diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/neps/missing-data.rst | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/neps/missing-data.rst b/doc/neps/missing-data.rst index 6a4781f10..fabecf36e 100644 --- a/doc/neps/missing-data.rst +++ b/doc/neps/missing-data.rst @@ -354,14 +354,22 @@ Some examples:: >>> np.sum(a, skipna=True) 11.0 >>> np.mean(a) - array(NA, dtype='<f8', masked=True) - >>> np.mean(a) + NA('<f8') + >>> np.mean(a, skipna=True) 3.6666666666666665 + >>> a = np.array([np.NA, np.NA], dtype='f8', masked=True) >>> np.sum(a, skipna=True) 0.0 >>> np.max(a, skipna=True) array(NA, dtype='<f8', masked=True) + >>> np.mean(a) + NA('<f8') + >>> np.mean(a, skipna=True) + /home/mwiebe/virtualenvs/dev/lib/python2.7/site-packages/numpy/core/fromnumeric.py:2374: RuntimeWarning: invalid value encountered in double_scalars + return mean(axis, dtype, out) + nan + PEP 3118 ======== |