[Numpy-discussion] Bug
Sasha
ndarray at mac.com
Fri Apr 28 10:49:02 EDT 2006
On 4/28/06, Louis Cordier <lcordier at point45.com> wrote:
> Souldn't the second example be a ticket ?
> Or is it part of #86 ?
I think all your examples are different signs of the same problem.
You can help by converting your examples into unit tests to be added
to say test_multiarray.py and attaching a patch to the ticket.
A brief comment for the developers: the problem that Louis reported is
caused by the fact that x.fill([]) creates an empty array internally
instead of a scalar object array containing an empty list. Note that
numpy does not even have a good notation for the required object:
>>> from numpy import *
>>> x = zeros(1,'O')
>>> x.shape=()
>>> x[()] = []
>>> x
array([], dtype=object)
>>> x.shape
()
but
>>> array([], dtype=object).shape
(0,)
More information about the NumPy-Discussion
mailing list