Thanks alot people, my problem is gone now.
Keith Goodman skrev:
> On Thu, Feb 12, 2009 at 9:21 AM, Ralph Kube wrote:
>> The same happens on the ipython prompt:
>>
>> 0.145 * 0.005 = 28.996
>> N.int32(0.145 * 0.005) = 28
>>
>> Any ideas how to deal with this?
>
> Do you want the answ
On Thu, Feb 12, 2009 at 9:21 AM, Ralph Kube wrote:
> The same happens on the ipython prompt:
>
> 0.145 * 0.005 = 28.996
> N.int32(0.145 * 0.005) = 28
>
> Any ideas how to deal with this?
Do you want the answer to be 29? N.int32 truncates. If you want to
round instead, you could use th
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.996
> N.int32(0.145 * 0.005) = 28
conversion to int truncates, it doesn't round. Try
N.int32(
On Thu, Feb 12, 2009 at 11:21 AM, Ralph Kube wrote:
> 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
>
> import numpy as N
> from scipy.integrate import quad
> T = 1
> dt = 0.005
> L = 3
> n = 2
> ints
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
import numpy as N
from scipy.integrate import quad
T = 1
dt = 0.005
L = 3
n = 2
ints = N.zeros([T/dt])
for t in N.arange(0, T, dt):
a = quad(lambda