[SciPy-dev] scipy.minimum on complex numbers returns junk

Nils Wagner nwagner at mecha.uni-stuttgart.de
Thu Oct 13 05:59:20 CDT 2005


Pearu Peterson wrote:
>Hi,
>
>I'd like to report an odd behaviour when finding scipy.minimum on complex 
>numbers:
>In [2]: scipy.minimum(1,2j)   # should return 2j
>Out[2]: 6.6869516415167017e-316j
>
>In [3]: scipy.minimum(-1,2j)  # should return -1
>Out[3]: (-1+7.7025147686483706j)
>
>Pearu
>
>_______________________________________________
>Scipy-dev mailing list
>Scipy-dev at scipy.net
>http://www.scipy.net/mailman/listinfo/scipy-dev
>  

Indeed, a very strange behaviour

>>> scipy.minimum(1,2j)
36.003296861206081j
>>> scipy.minimum(-1,2j)
(-1+36.003296861206081j)
>>> scipy.base.__version__
'0.4.3.1262'
>>> scipy.maximum(1,2j)
(1+1.585534972086793e+29j)
>>> scipy.maximum(-1,2j)
1.585534972086793e+29j
>>>




More information about the Scipy-dev mailing list