[Numpy-discussion] Improved creation of object arrays
oliphant.travis at ieee.org
Wed Jul 19 11:08:52 CDT 2006
Travis Oliphant wrote:
> I made a small change to the array creation function so that if you
> explicitly specify dtype=object, then the logic for determining the
> shape of the array is changed.
> The new logic for constructing dtype=object arrays from Python sequences
> is that the shape is determined by nested lists (and only lists). The
> nesting must be consistent or else the elements of the last conforming
> lists are assumed to be objects.
Now lists and tuples are both allowed for determining nested lists (that
was needed for record arrays).
The shapes still have to match for a new dimension to be "detected"
More information about the Numpy-discussion