[Scipy-tickets] [SciPy] #264: ndimage generic_filter1d memory error on 64 bit

SciPy scipy-tickets at scipy.net
Fri Sep 15 12:35:11 CDT 2006


#264: ndimage generic_filter1d memory error on 64 bit
--------------------------+-------------------------------------------------
 Reporter:  MatthewBrett  |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  normal        |   Milestone:          
Component:  Other         |     Version:          
 Severity:  normal        |    Keywords:          
--------------------------+-------------------------------------------------
 The current scipy svn ndimage.test() fails with:

 {{{
 ======================================================================
 ERROR: generic 1d filter 1
 ----------------------------------------------------------------------
 Traceback (most recent call last):
  File
 "/home/williams/usr/lib/python2.3/site-
 packages/scipy/ndimage/tests/test_ndimage.py",
 line 1141, in test_generic_filter1d01
    extra_keywords = {'total': weights.sum()})
  File
 "/home/williams/usr//lib/python2.3/site-
 packages/scipy/ndimage/filters.py",
 line 632, in generic_filter1d
    mode, cval, origin, extra_arguments, extra_keywords)
 MemoryError
 }}}

 This appears to be because, in nd_image.c, the Py_GenericFilter1D routine
 records the filter_size  input as 'i' to the PyArg_ParseTuple call, when
 in fact it is type 'l' - long.  Elsewhere, in the ni_filters.c and .h
 files, the filter_size and origin variables are given as type maybelong,
 when in fact they are always long. The attached patch fixes the maybelong
 / long references, and passes ndimage.test() on my 32 and 64 bit
 platforms.

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


More information about the Scipy-tickets mailing list