Numerical Python Bug ?
Uwe Schmitt
uwe at rocksport.de
Wed Nov 7 12:48:25 EST 2001
Hi,
during a *large computation* I get problems with vectors / arrays:
print sp
delivers
[ 100, 50,]
and
print 0.5*sp
yields
[ 0, 0, ]
type(sp) is "array" and type(sp[0]) is "float".
What makes me wonder is the output format. "print sp" should give
[ 100., 50. ]
which is different from my result above...
Further: if I use
print 1/2.0*sp
i get the correct result
[50, 25,]
Is there a bug in NumPy or Python respectively ???
Last but not least: If I use
alpha=0.5
print alpha
I get 0.0 as output !!!
One remark: all the behaviour above does not happen if I enter some vectors
manually...
Yours, Uwe.
--
Dr. Uwe Schmitt Uwe.Schmitt at num.uni-sb.de
Universitaet des Saarlandes Angewandte Mathematik
Building 36.1 Room 4.17 PO-Box 151150 D-66041 Saarbruecken
Mobile:0177/6806587 Fax:+49(0)681/302-4435 Office:+49(0)681/302-2468
More information about the Python-list
mailing list