[Numpy-discussion] Fixing #736 and possible memory leak
Charles R Harris
Fri Apr 25 10:39:41 CDT 2008
On Fri, Apr 25, 2008 at 8:27 AM, Travis E. Oliphant <email@example.com>
> > So on and so forth. The problem is this bit of code (among others)
> > stop_at_string = ((type == PyArray_OBJECT) ||
> > (type == PyArray_STRING &&
> > typecode->type == PyArray_STRINGLTR) ||
> > (type == PyArray_UNICODE) ||
> > (type == PyArray_VOID));
> > The question is, how do we interpret a string when the type is
> > specified? I think in that case we should try to convert the string to
> > the relevant type, just as we cast numbers to the relevant type. So we
> > should always stop at string.
> The extra test there is to not stop at the string when the typecode is
> 'c' (this is to ensure the behavior of 'c' that was in Numeric). So,
> this test should not be taken away. I'm not sure why it should be
> causing the kind of problems you are describing. But, if so, the fix is
I set it to stop at strings except for 'c' types and it seems to work now.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion