[SciPy-user] Inverting Complex64 array fails on OS X

Travis Oliphant oliphant.travis at ieee.org
Mon Jan 16 15:35:30 CST 2006


Andre Radke wrote:

>Travis Oliphant wrote:
>  
>
>>Andre Radke wrote:
>> >The dtypechar attribute of my Complex64 matrix was 'G'.
>>    
>>
>>This is definitely the problem.  It should be 'D'.  'G' is a complex
>>number with long doubles.
>>
>>How did you specify the matrix again?   Could you show us some of the
>>attributes of the matrix you created.  I'm shocked that 'G' was the
>>dtypechar...
>>    
>>
>
>jannu:/Volumes/Data/Diploma/code/py-smatrix andre$ /usr/local/bin/python
>ActivePython 2.4.2 Build 248 (ActiveState Corp.) based on
>Python 2.4.2 (#1, Oct  3 2005, 09:39:46)
>[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
>Type "help", "copyright", "credits" or "license" for more information.
>  
>
>>>> from scipy import *
>>>> a = array([[1, 1], [-1, -1j]], dtype=Complex64)
>>>> a
>>>>        
>>>>

I think I understand the problem.  On your system, longdouble is the 
same as double.  However,  not all of the code recognizes the 
equivalency of 'D' and 'G' on your system which causes the problem.  
I've patched things up so that Complex64 returns 'D' as expected even if 
'G' is the same type.   

Perhaps the SVN version will now work correctly.

-Travis




More information about the SciPy-user mailing list