summaryrefslogtreecommitdiff
path: root/numpy/lib/nanfunctions.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-05-30 19:06:24 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-06-02 22:55:09 +0200
commit0ae36289aa5104fce4e40c63ba46e19365f33b5d (patch)
tree12b29bf957f161e70ed8ff316c2519124bf89825 /numpy/lib/nanfunctions.py
parent39fbc1b1e7aee9220c62d8aeaa47eb885a4fde96 (diff)
downloadnumpy-0ae36289aa5104fce4e40c63ba46e19365f33b5d.tar.gz
ENH: rewrite ma.median to improve poor performance for multiple dimensions
many masked median along a small dimension is extremely slow due to the usage of apply_along_axis which iterates fully in python. The unmasked median is about 1000x faster. Work around this issue by using indexing to select the median element instead of apply_along_axis. Further improvements are possible, e.g. using the current np.nanmedian approach for masked medians along large dimensions so partition is used instead of sort or to extend partition to allow broadcasting over multiple elements. Closes gh-4683.
Diffstat (limited to 'numpy/lib/nanfunctions.py')
0 files changed, 0 insertions, 0 deletions