[NumPy-Tickets] [NumPy] #1999: fromiter swallows exceptions

NumPy Trac numpy-tickets@scipy....
Fri Dec 16 05:46:00 CST 2011

#1999: fromiter swallows exceptions
 Reporter:  ged         |       Owner:  somebody   
     Type:  defect      |      Status:  new        
 Priority:  normal      |   Milestone:  Unscheduled
Component:  numpy.core  |     Version:  none       
 Keywords:  fromiter    |  
 numpy.fromiter with a count argument hides any exception that might be
 raised by the iterator as: ValueError: iterator too short

 This is quite annoying because it makes for a totally
 ununderstandable/unrelated exception in many cases.

 This was already reported on the mailing list by Åsmund Hjulstad a few
 months ago but AFAIK nobody ever answered him.

 This bug is present in numpy 1.6.1 but I think it has been there for quite
 a while.

 See attached test case.

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

More information about the NumPy-Tickets mailing list