Thanks - that's clear I guess, although I still think that it might be
less confusing if numpy did not try to be clever!
On 1/3/08, Christopher Barker <[EMAIL PROTECTED]> wrote:
> Garnet Chan wrote:
> > When constructing an numpy object array from a list of numpy arrays,
> > one observes the follo
Garnet Chan wrote:
> When constructing an numpy object array from a list of numpy arrays,
> one observes the following behaviour
>
import numpy as N
a=[N.zeros([2,2], N.object_), N.zeros([2,2], N.object_)]
b=N.array(a, N.object_)
print b.shape
> (2, 2, 2)
a=[N.zeros([2,2],
When constructing an numpy object array from a list of numpy arrays,
one observes the following behaviour
>>> import numpy as N
>>> a=[N.zeros([2,2], N.object_), N.zeros([2,2], N.object_)]
>>> b=N.array(a, N.object_)
>>> print b.shape
(2, 2, 2)
>>> a=[N.zeros([2,2], N.object_), N.zeros([2,1], N.ob