[Scipy-tickets] [SciPy] #1586: scipy ndimage functions fails with half precision arrays

SciPy Trac scipy-tickets@scipy....
Tue Jan 17 11:15:10 CST 2012


#1586: scipy ndimage functions fails with half precision arrays
----------------------------+-----------------------------------------------
 Reporter:  barbey          |       Owner:  somebody   
     Type:  defect          |      Status:  new        
 Priority:  normal          |   Milestone:  Unscheduled
Component:  scipy.ndimage   |     Version:  0.10.0     
 Keywords:  half-precision  |  
----------------------------+-----------------------------------------------
 Reproduce with following code :

 #!/usr/bin/env python
 import numpy as np
 import scipy
 from scipy import ndimage

 a = np.arange(16).reshape(4, 4).astype(np.float16)
 b = ndimage.gaussian_filter(a, 1)

 Which returns :

 ---------------------------------------------------------------------------
 RuntimeError                              Traceback (most recent call
 last)
 C:\Python27\lib\site-packages\ipython-0.13.dev-
 py2.7.egg\IPython\utils\py3compat.pyc in execfile(fname, glob, loc)
     166             else:
     167                 filename = fname
 --> 168             exec compile(scripttext, filename, 'exec') in glob,
 loc
     169     else:
     170         def execfile(fname, *where):

 D:\DATA\HOME\projets\various\test_ndimage_dtype.py in <module>()
       5
       6 a = np.arange(16).reshape(4, 4).astype(np.float16)
 ----> 7 b = ndimage.gaussian_filter(a, 1)

 C:\Python27\Lib\site-packages\scipy\ndimage\filters.pyc in
 gaussian_filter(input, sigma, order, output, mode, cval)
     276         for axis, sigma, order in axes:
     277             gaussian_filter1d(input, sigma, axis, order, output,
 --> 278                               mode, cval)
     279             input = output
     280     else:

 C:\Python27\Lib\site-packages\scipy\ndimage\filters.pyc in
 gaussian_filter1d(input, sigma, axis, order, output, mode, cval)
     228             weights[lw + ii] = -tmp
     229             weights[lw - ii] = tmp
 --> 230     return correlate1d(input, weights, axis, output, mode, cval,
 0)
     231
     232

 C:\Python27\Lib\site-packages\scipy\ndimage\filters.pyc in
 correlate1d(input, weights, axis, output, mode, cval, origin)
     137     mode = _ni_support._extend_mode_to_code(mode)
     138     _nd_image.correlate1d(input, weights, axis, output, mode,
 cval,
 --> 139                           origin)
     140     return return_value
     141

 RuntimeError: array type 23 not supported

 Platform : Windows 7 64 bits, 32 bits python
 numpy version 1.61.
 scipy version 0.10.0

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


More information about the Scipy-tickets mailing list