[Numpy-discussion] ticket 788: possible blocker
Sat May 10 17:09:00 CDT 2008
I have added a patch to the ticket. I believe it fixes the problem. It
required mirroring a very complicated logical expression from
PyArray_CastToType in array_cast. I suspect that for readability, this
expression should be encapsulated somewhere as a function, with a
int PyArray_EquivDescr(PyArray_Descr *descr1, PyArray_Descr *descr2)
returning True if they are equivalent. I don't understand the
conditions well enough to be confident about this, however.
Eric Firing wrote:
> Jarrod et al.,
> I just ran into a nasty bug, described in ticket 788: under some
> circumstances, which I don't understand, the astype method fails to
> return a copy and returns the original array instead. It causes bizarre
> behavior in basemap (Jeff Whitaker's mapping toolkit for matplotlib),
> which is where I stumbled over it.
> The ticket includes a pickled array that illustrates the behavior with
> 1.2.0.dev5150--at least on my system (ubuntu feisty, 32-bit).
> Numpy-discussion mailing list
More information about the Numpy-discussion