[Numpy-discussion] alternative mechanism for initializing anarray

Citi, Luca lciti@essex.ac...
Fri Jul 17 03:29:02 CDT 2009

all these alternative mechanisms for initializing
arrays risk to break current code. Isn't it?
Then one would need to specify the data type
with a kw argument while with the current
implementation the second argument is the data type
irregardless of whether or not it is given with
the dtype keyword.

>>> np.array(['AB','S4'])
array(['AB', 'S4'], 
>>> np.array('AB','S4')
array('AB', dtype='|S4')


More information about the NumPy-Discussion mailing list