[Scipy-tickets] [SciPy] #587: TypeError: only length-1 arrays can be converted to Python scalars

SciPy scipy-tickets@scipy....
Mon Jan 14 13:13:28 CST 2008


#587: TypeError: only length-1 arrays can be converted to Python scalars
-------------------------+--------------------------------------------------
 Reporter:  nils         |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  normal       |   Milestone:  0.7     
Component:  scipy.stats  |     Version:  devel   
 Severity:  normal       |    Keywords:          
-------------------------+--------------------------------------------------
 {{{
 ======================================================================
 ERROR: test_huber (test_scale.TestScale)
 ----------------------------------------------------------------------
 Traceback (most recent call last):
   File "/usr/local/lib64/python2.5/site-
 packages/scipy/stats/models/tests/test_scale.py", line 35, in test_huber
     m = scale.huber(X)
   File "/usr/local/lib64/python2.5/site-
 packages/scipy/stats/models/robust/scale.py", line 82, in __call__
     for donothing in self:
   File "/usr/local/lib64/python2.5/site-
 packages/scipy/stats/models/robust/scale.py", line 102, in next
     scale = N.sum(subset * (a - mu)**2, axis=self.axis) / (self.n *
 Huber.gamma - N.sum(1. - subset, axis=self.axis) * Huber.c**2)
   File "/usr/local/lib64/python2.5/site-
 packages/numpy/core/fromnumeric.py", line 866, in sum
     return sum(axis, dtype, out)
 TypeError: only length-1 arrays can be converted to Python scalars
 }}}

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


More information about the Scipy-tickets mailing list