[Numpy-tickets] [NumPy] #604: array creation does not work with generators

NumPy numpy-tickets@scipy....
Sat Nov 3 14:47:47 CDT 2007

#604: array creation does not work with generators
 Reporter:  chtito  |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:  1.0.4   
Component:  Other   |     Version:  none    
 Severity:  normal  |    Keywords:          
 I think that `array(n**2 for n in range(10))` should create an array with
 ten elements. Right now it creates an array with only one generator object
 which is not consistent with the behaviour for lists. Indeed, `array([n**2
 for n in range(10)])` creates an array with ten elements instead of an
 array of one list object.

Ticket URL: <http://scipy.org/scipy/numpy/ticket/604>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.

More information about the Numpy-tickets mailing list