[Scipy-tickets] [SciPy] #1165: nanstd, namean etc choke on axis=1.2

SciPy Trac scipy-tickets@scipy....
Sun Apr 25 08:12:57 CDT 2010


#1165: nanstd, namean etc choke on axis=1.2
-------------------------+--------------------------------------------------
 Reporter:  kwgoodman    |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  normal       |   Milestone:  0.8.0   
Component:  scipy.stats  |     Version:  0.7.0   
 Keywords:               |  
-------------------------+--------------------------------------------------

Comment(by josefpktd):

 I'm not sure I want to catch this case.

 I have a similar problem with functions that take a tuple and when I
 forget the brackets, the second argument is interpreted as axis or
 dtype. Some functions in numpy have recently been improved to detect
 some cases of wrong dtype arguments that might have been typed by
 mistake. The argument is less obvious in this case.

 {{{
 >>> np.mean(1.5,0.3)
 1.5
 >>> np.mean((1.5,0.3))
 0.90000000000000002
 }}}

 So my intuition would be to raise a ValueError in this case, but the
 TypeError is also relatively informative.

 Wontfix?

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


More information about the Scipy-tickets mailing list