[Scipy-tickets] [SciPy] #1400: nanmedian chokes on size zero arrays

SciPy Trac scipy-tickets@scipy....
Wed Mar 2 14:26:48 CST 2011


#1400: nanmedian chokes on size zero arrays
-------------------------+--------------------------------------------------
 Reporter:  kwgoodman    |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  normal       |   Milestone:          
Component:  scipy.stats  |     Version:  0.8.0   
 Keywords:               |  
-------------------------+--------------------------------------------------
 scipy.stats.nanmedian chokes on certain size zero arrays and axis
 combinations:
 {{{
 >> from scipy.stats import nanmedian
 >> a = np.ones((0,2))
 >> np.median(a, 1)
    array([], dtype=float64)
 >> nanmedian(a, 1)
 <snip>
 IndexError: invalid index
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1400>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list