[Numpy-discussion] array not appending

Ravi lists_ravi@lavabit....
Thu Dec 18 08:46:55 CST 2008


On Thursday 18 December 2008 08:00:09 Sebastian Haase wrote:
> So the question remains: how to create an array of "empty" (i.e. 0) size ?

In [1]: from numpy import *

In [2]: x = array( [] )

In [3]: x
Out[3]: array([], dtype=float64)

In [4]: x.size
Out[4]: 0

In [5]: x.shape
Out[5]: (0,)

In [6]: y = zeros( (0,), dtype=int32 )

In [7]: y.shape
Out[7]: (0,)

Regards,
Ravi





More information about the Numpy-discussion mailing list