[Scipy-tickets] [SciPy] #1839: ndimage.center_of_mass doesnt return all for all labelled objects

SciPy Trac scipy-tickets@scipy....
Wed Feb 6 13:39:17 CST 2013


#1839: ndimage.center_of_mass doesnt return all for all labelled objects
---------------------------+------------------------------------------------
 Reporter:  nzjrs          |       Owner:  stefan     
     Type:  defect         |      Status:  new        
 Priority:  normal         |   Milestone:  Unscheduled
Component:  scipy.ndimage  |     Version:  0.9.0      
 Keywords:                 |  
---------------------------+------------------------------------------------
Changes (by warren.weckesser):

  * owner:  somebody => stefan
  * component:  Other => scipy.ndimage


Comment:

 I think the docstring is incorrect.

 `center_of_mass` passes `index` to `ndimage.measurements.sum`, and `sum`
 passes it to `ndimage.measurements._stats`.  The `_stats` docstring says:

 {{{
 index : label or sequence of labels, optional
     These are the labels of the groups for which the stats are computed.
     If `index` is None, the stats are computed for the single group where
     `labels` is greater than 0.
 }}}

 The docstring for `center_of_mass` should be changed similarly to reflect
 the actual behavior.

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1839#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