diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-10-04 13:49:33 -0600 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-10-04 16:07:38 -0600 |
commit | 9c7e6e30315ab4541775d9a78630e88423c752c1 (patch) | |
tree | b6b4a74d215a577c65f3e1dbfb493beef9176df1 /numpy/lib/tests/test_recfunctions.py | |
parent | f665c617065ba59b1c517b8dd44080c83dbfd5bd (diff) | |
download | numpy-9c7e6e30315ab4541775d9a78630e88423c752c1.tar.gz |
BUG: Refactor nanfunctions to behave as agreed on for 1.9.
Deal with subclasses of ndarray, like pandas.Series and matrix.
Subclasses may not define the new keyword keepdims or deal
gracefully with ufuncs in all their forms. This is solved by
throwing the problem onto the np.sum, np.any, etc. functions
that have ugly hacks to deal with the problem.
Settle handling of all-nan slices.
nanmax, nanmin -- Raise warning, return NaN for slice.
nanargmax, nanargmin -- Raise ValueError.
nansum -- Return 0 for slice.
nanmean, nanvar, nanstd -- Raise warning, return NaN for slice.
Make NaN functions work for scalar arguments.
This may seem silly, but it removes a check for special cases.
Update tests
Deal with new all-nan handling.
Test with matrix class as example of subclass without keepdims.
Test with scalar arguments.
Fix nanvar issue reported in #3860.
Closes #3860 #3850
Diffstat (limited to 'numpy/lib/tests/test_recfunctions.py')
0 files changed, 0 insertions, 0 deletions