[SciPy-user] multiplying scalar with complex matrix segfaults

Evan Monroig evan.monroig at gmail.com
Thu Jan 19 19:45:51 EST 2006


On Jan.19 20h53, Andre Radke wrote :
> 
> When I try to multiply a float value with a complex matrix object, I get unexpected results or even a segfault, e.g.:
> 
> jannu:~ 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 *
> >>> 1.0 * matrix(eye(3, dtype=complex))
> matrix([[ 1.+0.j,  0.+0.j,  0.+0.j],
>        [ 0.+0.j,  0.+0.j,  0.+0.j],
>        [ 0.+0.j,  0.+0.j,  1.+0.j]])
> >>> 1.0 * matrix(eye(41, dtype=complex))
> Segmentation fault
> 
> Can anybody else reproduce this?
> 
> This is using NumPy 0.9.4.1923, SciPy 0.4.4.1558, and ActivePython 
> 2.4.2 on Mac OS X 10.3.9.

Works okay for me (but I have to do 'from numpy import *' instead of 
scipy)

NumPy 0.9.3.1836, Scipy 0.4.4.1526 on MacPython 2.4.1 and Mac OS X 10.4

Evan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20060120/41f38147/attachment.sig>


More information about the SciPy-User mailing list