[NumPy-Tickets] [NumPy] #1952: Float not allowed in std ddof

NumPy Trac numpy-tickets@scipy....
Sat Mar 3 07:43:37 CST 2012


#1952: Float not allowed in std ddof
------------------------+---------------------------------------------------
 Reporter:  pv          |       Owner:  somebody    
     Type:  defect      |      Status:  needs_review
 Priority:  normal      |   Milestone:  1.7.0       
Component:  numpy.core  |     Version:  1.6.0       
 Keywords:              |  
------------------------+---------------------------------------------------

Comment(by rgommers):

 Works for me too, and looks like the answer is correct. Shouldn't the
 valid inputs be limited to [0, input.size] though?

 {{{
 >>> x = np.array([1, 1, 2])
 >>> x.std(ddof=1)
 0.57735026918962573
 >>> x.std(ddof=1.4)
 0.6454972243679028
 >>> x.std(ddof=4)  # OK, can live with NaN perhaps
 nan
 >>> x.std(ddof=-1)  # really?
 0.40824829046386302
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1952#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list