Ralph Kube schrieb:
> Hi there,
> I have a little problem here with array indexing, hope you see the problem.
> I use the following loop to calculate some integrals
>
> ...
> 0.145 * 0.005 = 28.999999999999996
> N.int32(0.145 * 0.005) = 28
conversion to int truncates, it doesn't round. Try
N.int32(0.145 * 0.005  +  0.5)

Gregor
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to