[SciPy-dev] TypeError: __array_data__ must return a string providing the pointer to data

Travis Oliphant oliphant at ee.byu.edu
Fri Oct 21 18:48:40 EDT 2005


Stephen Walton wrote:

>Travis Oliphant wrote:
>
>  
>
>>You still need the very latest CVS ... The array interface protocol had 
>>to change to support discontiguous arrays (and read-only) arrays.  These 
>>changes are only in the latest CVS versions of numarray and Numeric.
>> 
>>
>>    
>>
>Sigh.  Unfortunately on the two Linux releases I'm using (Ubuntu and 
>Fedora Core 4), pygtk2 contains a dependency on Numeric and therefore 
>you're more-or-less forced to install the distros' version, currently at 
>23.8.  I know that's not up to you to fix, Travis!  But, hypothetically, 
>you're telling me that if I did forcibly install Numeric and numarray 
>from current CVS, that they would play nice with the new scipy core and 
>with matplotlib?
>  
>
Yes, this works.  I just tried it on my windows machine.

Installing Numeric 24.0 and scipy core allows matplotlib to work with 
scipy core arrays (they get quickly converted to Numeric 24.0 arrays 
behind the scenes using the array interface).

Unfortunately this does not work with Numeric 23.8 (even through the 
sequence interface) because the __array__ method of scipy core does not 
return a Numeric array (and Numeric doesn't do the right thing before 
Numeric 24.0).

-Travis





More information about the SciPy-Dev mailing list