[SciPy-dev] pickling problem

Travis Oliphant oliphant.travis at ieee.org
Thu Dec 1 11:29:32 EST 2005


Darren Dale wrote:

>I am using gentoo on a 64 bit Athlon, gcc-3.4.4, python-2.4.2. This morning, I 
>removed Numeric, the rebuilt version 24.2 from scratch,  and still get the 
>same error. Last night I tested the same scipy/Numeric combination on a 32 
>bit system (gentoo, same gcc and python), and was not able to reproduce the 
>error there.
>  
>
Perhaps this is a 64-bit issue with unpickling?

>  
>
>>I can't seem to reproduce this error.
>>
>>This error will only show up in the array_fromstructinterface code which
>>parses the array_struct interface information.
>>
>>What is the result of b.flags on your system?  To find out insert print
>>b.flags right before you call Numeric.array.
>>
>>Mine is
>>
>>{'WRITEABLE': True, 'UPDATEIFCOPY': False, 'NOTSWAPPED': True,
>>'CONTIGUOUS': True, 'FORTRAN': True, 'ALIGNED': True, 'OWNDATA': False}
>>
>>In particular you are looking for WRITEABLE and ALIGNED to both be True.
>>    
>>
>
>mine is
>
>{'WRITEABLE': True, 'UPDATEIFCOPY': False, 'NOTSWAPPED': True, 'CONTIGUOUS': 
>True, 'FORTRAN': True, 'ALIGNED': False, 'OWNDATA': False}
>  
>
That's why you are getting the error, right there.  Your unpickled array 
is flagged as misaligned.  Numeric doesn't deal with misaligned or not 
writeable data. 

That means either that it's pointer is not on a boundary for the type or 
the strides are not.   I'm sure this is a 64-bit issue but don't know 
exactly the cause.  

Can you give me the result of

b.strides
b.__array_data__

and

b.flags.aligned = True ?

-Travis







More information about the SciPy-Dev mailing list