[Numpy-discussion] Review of issue 825

Charles R Harris charlesr.harris at gmail.com
Wed Jun 25 11:14:23 EDT 2008


On Wed, Jun 25, 2008 at 8:17 AM, Charles R Harris <charlesr.harris at gmail.com>
wrote:

>
>
> On Wed, Jun 25, 2008 at 8:12 AM, Charles R Harris <
> charlesr.harris at gmail.com> wrote:
>
>>
>>
>> On Wed, Jun 25, 2008 at 12:44 AM, Neil Muller <drnlmuller+scipy at gmail.com<drnlmuller%2Bscipy at gmail.com>>
>> wrote:
>>
>>> Could someone review the patch at
>>> http://scipy.org/scipy/numpy/ticket/825, please?
>>>
>>> The issue prevents the test suite running successfully on Sparc, so
>>> I'd like to see it fixed.
>>>
>>
>> Looks like the copybuffer should use the npy_ucs4 type, although I need to
>> look at rest of the code there to be sure. You can see examples in the
>> _sortmodule.c.src file.
>>
>> Numpy has settled on a 4 byte encoding for unicode, what does python on
>> sparc use?
>>
>
> Also, if you are just allocating temporary space in the function you can
> use the normal malloc/free combination if that helps.
>

OK, the problem in the UNICODE_{get,set}item routines is converting between
ucs4 and the encoding python is using, which may be ucs2.  But there is
something strange if sparc is using ucs4 (Py_UNICODE_WIDE) and the pointer
ip is aligned on two bytes instead of 4, that would seem to indicate a
problem further up the call chain. Could you check that that is actually
happening, i.e., ip is not 4 byte aligned and Py_UNICODE_WIDE is defined?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080625/02d59706/attachment.html>


More information about the NumPy-Discussion mailing list