[Scipy-tickets] [SciPy] #1254: ndimage.measurements.variance returns negative values sometimes

SciPy Trac scipy-tickets@scipy....
Thu Oct 14 19:24:00 CDT 2010

#1254: ndimage.measurements.variance returns negative values sometimes
  Reporter:  thouis         |       Owner:  somebody
      Type:  defect         |      Status:  closed  
  Priority:  high           |   Milestone:  0.9.0   
 Component:  scipy.ndimage  |     Version:  0.7.0   
Resolution:  fixed          |    Keywords:          

Comment(by warren.weckesser):

 In r6840, the second argument of issubdtype was changed to a tuple.  I
 don't think that works:
 In [1]: import numpy as np

 In [2]: a = np.array([1,2,3], dtype=np.uint32)

 In [3]: np.issubdtype(a.dtype, np.unsignedinteger)
 Out[3]: True

 In [4]: np.issubdtype(a.dtype, (np.int, np.unsignedinteger))
 Out[4]: False

 Maybe just test both cases with an 'or'?

 P.S. Ticket #1242 suggests making the same change in the _select()

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