summaryrefslogtreecommitdiff
path: root/numpy/lib/nanfunctions.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2016-12-12 23:15:21 +0100
committerJulian Taylor <jtaylor.debian@googlemail.com>2016-12-12 23:19:06 +0100
commit3b31fa130959bbc5544e7b5fa5226076466d6d88 (patch)
tree316a7047ebba9686fcd66d1861036b8feffdc801 /numpy/lib/nanfunctions.py
parent82a1d81fc63fc74d97a5ef949790f91f39f41f04 (diff)
downloadnumpy-3b31fa130959bbc5544e7b5fa5226076466d6d88.tar.gz
ENH: update the small nanmedian threshold
The apply_along_axis path is significantly more expensive than currently accounted for in the check. Increase the minimum axis size from 400 to 1000 elements. Either apply_along_axis got more expensive over time or the original benchmarking was flawed.
Diffstat (limited to 'numpy/lib/nanfunctions.py')
-rw-r--r--numpy/lib/nanfunctions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/nanfunctions.py b/numpy/lib/nanfunctions.py
index c024055ba..08358a030 100644
--- a/numpy/lib/nanfunctions.py
+++ b/numpy/lib/nanfunctions.py
@@ -869,7 +869,7 @@ def _nanmedian(a, axis=None, out=None, overwrite_input=False):
else:
# for small medians use sort + indexing which is still faster than
# apply_along_axis
- if a.shape[axis] < 400:
+ if a.shape[axis] < 1000:
return _nanmedian_small(a, axis, out, overwrite_input)
result = np.apply_along_axis(_nanmedian1d, axis, a, overwrite_input)
if out is not None: