[Numpy-discussion] Bugs using complex192

Nils Wagner nwagner@iam.uni-stuttgart...
Mon Jan 7 11:57:40 CST 2008


On Mon, 7 Jan 2008 10:10:50 +0100
  "Matthieu Brucher" <matthieu.brucher@gmail.com> wrote:
> i,
> 
> I managed to reproduce your bugs on a FC6 box :
>>>> import numpy as n
> 
>>>> n.sqrt(n.array([-1.0],dtype = n.complex192))
> array([0.0+9.2747134e+492j], dtype=complex192)
> 
>>>> n.sqrt(n.array([-1.0],dtype = n.complex128))
> array([ 0.+1.j])
> 
>>>> x=n.array([0.0+0.0j, 1.0+0.0j], dtype=n.complex192)
>>>> x
> array([0.0+0.0j, 1.0+0.0j], dtype=complex192)
> 
>>>> -x
> array([3.3621031e-4932+-1.0204727e+2057j, 
>1.6794099e-4932+5.5355029e-4930j],
> dtype=complex192)
> 
>>>> n.__version__
> '1.0.5.dev4494'
> 
> Matthieu
> 
> 2008/1/7, Matts Bjoerck <Matts.Bjorck@gmail.com>:
>>
>> Hi,
>>
>> I've started using complex192 for some calculations and 
>>came across two
>> things
>> that seems to be bugs:
>>
>> In [1]: sqrt(array([-1.0],dtype = complex192))
>> Out[1]: array([0.0+-6.1646549e-4703j], dtype=complex192)
>>
>> In [2]: sqrt(array([-1.0],dtype = complex128))
>> Out[2]: array([ 0.+1.j])
>>
>> In [3]: x
>> Out[3]: array([0.0+0.0j, 1.0+0.0j], dtype=complex192)
>>
>> In [4]: -x
>> Out[4]: array([3.3621031e-4932+0.0012454e-5119j,
>> 1.6794099e-4932+0.0011717e-5119j], dtype=complex192)
>>
>> So, sqrt and using a negation does not seem to work. 
>>Have anyone else came
>> across this as well?
>>
>> using numpy 1.0.3 on ubuntu
>>
>> Any help appriciated
>>
>> /Matts
>>
>> _______________________________________________
>> Numpy-discussion mailing list
>> Numpy-discussion@scipy.org
>> http://projects.scipy.org/mailman/listinfo/numpy-discussion
>>
> 
> 
> 
> -- 
>French PhD student
> Website : http://matthieu-brucher.developpez.com/
> Blogs : http://matt.eifelle.com and 
>http://blog.developpez.com/?blog=92
> LinkedIn : http://www.linkedin.com/in/matthieubrucher

>>> numpy.sqrt(numpy.array([-1.0], dtype=numpy.complex192))
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 
'complex192'
>>> numpy.__version__
'1.0.5.dev4673'

Nils



More information about the Numpy-discussion mailing list