[SciPy-dev] abs return the absolute value of the argument (and this should be real)

Nils Wagner nwagner at iam.uni-stuttgart.de
Fri Jun 16 09:39:39 EDT 2006


>>> a=rand(3,3)
>>> w=linalg.eigvals(a)
>>> w
array([ 1.28249999+0.j, -0.29921706+0.j,  0.01819573+0.j])
>>> abs(w)
array([ 1.28249999,  0.29921706,  0.01819573])
>>> abs(w[0])
(1.2824999903657521+0j)


abs return the absolute value of the argument and this should be real.

BTW, I am using

>>> numpy.__version__
'0.9.9.2628'
>>> scipy.__version__
'0.5.0.1977'




More information about the SciPy-Dev mailing list