[Scipy-tickets] [SciPy] #410: scipy.ndimage.sum crashes Python when index is dtype int64

SciPy scipy-tickets@scipy....
Fri May 4 18:27:45 CDT 2007


#410: scipy.ndimage.sum crashes Python when index is dtype int64
---------------------------+------------------------------------------------
 Reporter:  socha          |       Owner:  somebody                     
     Type:  defect         |      Status:  new                          
 Priority:  normal         |   Milestone:                               
Component:  scipy.ndimage  |     Version:  0.5.2                        
 Severity:  normal         |    Keywords:  ndimage sum crash index int64
---------------------------+------------------------------------------------
 scipy.ndimage.sum seems to crash Python when the dtype of the index array
 is int64.

 {{{
 Microsoft Windows XP [Version 5.1.2600]
 (C) Copyright 1985-2001 Microsoft Corp.

 Z:\>python
 Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug  2 2006, 12:09:59) [MSC
 v.1310 32 bit (Intel)] on win32
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import scipy
 >>> scipy.__version__
 '0.5.2'
 >>> import numpy
 >>> numpy.__version__
 '1.0.2'
 >>> from numpy import array
 >>> from scipy.ndimage import sum
 >>> sum(array([1]), index=array([1], dtype='int32'), labels=array([1],
 dtype='int32'))
 1.0
 >>> sum(array([1]), index=array([1], dtype='int32'), labels=array([1],
 dtype='int64'))
 1.0
 >>> sum(array([1], dtype='int64'), index=array([1], dtype='int32'),
 labels=array([1], dtype='int32'))
 1.0
 >>> sum(array([1]), index=array([1], dtype='int64'), labels=array([1],
 dtype='int32'))
 }}}

 At which point, Python crashes.  See attached screenshot.

 -- David Socha & Daniel Terhorst ([http://www.urbansim.org/ UrbanSim])

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


More information about the Scipy-tickets mailing list