[Numpy-discussion] 3D array problem in Python
Sun Dec 30 06:47:26 CST 2012
These two functions namely F1 and F2 are really exponential and Bessel functions respectively. But I can not change its analytic form..
I mean is there way to get more quickly the result?
Let's say above mentioned two functions, both of them, one function but the dimension I showed should not be changed..
What do you think here whether the problem is with 3 dimension or....???
Thanks in advance for your answer!
Воскресенье, 30 декабря 2012, 13:13 +01:00 от oc-spam66 <firstname.lastname@example.org>:
>> val11[i][j], val22[i][j] = integrate.quad(lambda x: F1(x)*F2(x), 0, pi)
>> But, this calculation takes so long time, let's say about 1 hour
>> (theoretically)... Is there any better way to easily and fast calculate
>> the process such as [ F( i ) for i in xlist ] or something like that
>> rather than using for loop?
>* What are F1() and F2()? Do they depend on anything else than 'x'?
>Maybe you meant Fi() and Fj(). In that case, can you benefit of a
>* It's likely that all the computing time is in the "integrate"
>operation (check it with a profiler? %prun under ipython for example).
>In this situation, there's no improvement possible, apart from using a
>simpler function than integrate() that might be vectorized (this depends
>on the definition of Fi())
>NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion