[Numpy-discussion] 3D array problem in Python
Happyman
bahtiyor_zohidov at mail.ru
Sun Dec 30 07:47:26 EST 2012
Actually
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 <oc-spam66 at laposte.net>:
>Hello,
>
>> else:
>> 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
>symmetry property?
>* 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
>NumPy-Discussion at scipy.org
>http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20121230/7ddd0df4/attachment.html>
More information about the NumPy-Discussion
mailing list