From c7dd1e5295fcc0218bab764185ff047ee7057c77 Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Sun, 23 Jun 2013 15:47:59 -0600 Subject: MAINT: Refactor nanfunctions. nanmax, nanmin -------------- Add out and keepdims keywords. nanargmin, nanargmax -------------------- A NanWarning is raised if an all NaN slice detected. For all such slices np.iingo(np.intp).min is returned as the index value. nansum ------ The keywords dtype, out, and keepdims are added. A FutureWarning is raised, as in the future the mean of an empty slice after NaN replacement will be 0 instead of the current NaN. nanmean, nanvar, nanstd ----------------------- For all, if the input array is of inexact type then the dtype and out parameters must be of inexact type if specified. That insures that NaNs can be returned when appropriate. The nanmean function detects empty slices after NaN replacement and raises a NanWarning. NaN is returned as the value for all such slices. The nanmean and nanstd functions detect degrees of freedom <= 0 after NaN replacement and raise a NanWarning. NaN is returned as the value for all such slices. --- numpy/testing/nosetester.py | 1 + 1 file changed, 1 insertion(+) (limited to 'numpy/testing/nosetester.py') diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py index 212afe79b..79ae79765 100644 --- a/numpy/testing/nosetester.py +++ b/numpy/testing/nosetester.py @@ -377,6 +377,7 @@ class NoseTester(object): warnings.filterwarnings("ignore", message="numpy.dtype size changed") warnings.filterwarnings("ignore", message="numpy.ufunc size changed") warnings.filterwarnings("ignore", category=ModuleDeprecationWarning) + warnings.filterwarnings("ignore", category=FutureWarning) from .noseclasses import NumpyTestProgram -- cgit v1.2.1