[Scipy-tickets] [SciPy] #1161: nanstd chokes on negative axis

SciPy Trac scipy-tickets@scipy....
Fri Apr 23 13:58:16 CDT 2010


#1161: nanstd chokes on negative axis
-------------------------+--------------------------------------------------
 Reporter:  kwgoodman    |       Owner:  somebody    
     Type:  defect       |      Status:  needs_review
 Priority:  normal       |   Milestone:  0.8.0       
Component:  scipy.stats  |     Version:  0.7.0       
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by josefpktd):

 _chk_asarray(x,axis) for axis=None flattens the array and sets axis=0

 So expand_dims works in this case

 nanstd2 is the version with expand_dims:

 {{{
 >>> nanstd2(x1, axis=None, bias=True)
 2.6728177547300174

 >>> print np.ma.fix_invalid(x1).std(None, ddof=0)
 2.67281775473
 }}}

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


More information about the Scipy-tickets mailing list