Re: [Numpy-discussion] 3D array problem in Python

2012-12-31 Thread Raul Cota
Quick comment since I was working on timing trivial operations, If I run the triple loop with R with only zeros thus avoiding the integration, the loop takes in my computer about 1 second with the float() function and about 1.5 without it if R is dtype='float64' and 3.3 seconds if

[Numpy-discussion] 3D array problem in Python

2012-12-30 Thread Happyman
Hello I have 3 dimensional array  which I want  to calculate in a huge process. Everything is working well if I use ordinary way which is unsuitable in Python like the following: nums=32 rows=120 cols=150 for k in range(0,nums):           for i in range(0,rows):                      for j in

Re: [Numpy-discussion] 3D array problem in Python

2012-12-30 Thread oc-spam66
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

Re: [Numpy-discussion] 3D array problem in Python

2012-12-30 Thread Happyman
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

Re: [Numpy-discussion] 3D array problem in Python

2012-12-30 Thread Fabrice Silva
Le dimanche 30 décembre 2012 à 16:47 +0400, Happyman a écrit : 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

Re: [Numpy-discussion] 3D array problem in Python

2012-12-30 Thread Chris Barker - NOAA Federal
On Sun, Dec 30, 2012 at 3:41 AM, Happyman bahtiyor_zohi...@mail.ru wrote: nums=32 rows=120 cols=150 for k in range(0,nums): for i in range(0,rows): for j in range(0,cols): if float ( R[ k ] [ i ] [ j ] ) == 0.0: why the