[NumPy-Tickets] [NumPy] #1715: numpy.array catches to many errors

NumPy Trac numpy-tickets@scipy....
Sat Jan 15 12:08:53 CST 2011


#1715: numpy.array catches to many errors
--------------------+-------------------------------------------------------
 Reporter:  nils2   |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:  2.0.0   
Component:  Other   |     Version:  1.5.0   
 Keywords:          |  
--------------------+-------------------------------------------------------
 numpy.array catches to many errors when using the array interface

 Instead of failing and re-raising the exception in the following example,
 numpy simply constructs a 1-element array out of the image
 {{{
 import Image, numpy

 >>> img = Image.open("jane-doe.jpg")
 >>> img.tobitmap()
 IOError: decoder jpeg not available ...
 >>> array = numpy.array(img)
 >>> array
 array(<JpegImagePlugin.JpegImageFile instance at 0x101019dd0>,
 dtype=object)
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1715>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list