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

2012-12-30 Thread Happyman
Hi Chris Actually, I think the request by me was not so properly explained, I'm afraid (sorry about that!!!) Let me explain precisely, Last time I calculated matrix which is from only one file. it took exactly:  237.71387 seconds. Let's say approx. 4 minute! BUT, IF I use it for more than

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 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 float() -- what

Re: [Numpy-discussion] ANN: NumPy 1.7.0rc1 release

2012-12-30 Thread Sandro Tosi
Hi Ondrej & al, On Sat, Dec 29, 2012 at 1:02 AM, Ondřej Čertík wrote: > I'm pleased to announce the availability of the first release candidate of > NumPy 1.7.0rc1. Congrats on this RC release! I've uploaded this version to Debian and updated some of the issues related to it. There are also a c

Re: [Numpy-discussion] Manipulate neighboring points in 2D array

2012-12-30 Thread Nicolas Rougier
You might want to have a look at : http://code.google.com/p/glumpy/source/browse/demos/gray-scott.py which implements a Gray-Scott reaction-diffusion system. The 'convolution_matrix(src, dst, kernel, toric)' build a sparse matrix such that multiplying an array with this matrix will result in

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 mentione

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 sho

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 li

[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] Manipulate neighboring points in 2D array

2012-12-30 Thread deb
Thanks Zach for your interest I was thinking about ndimage.generic_filter when I wrote about generic filter. For generic_filter I used trivial function that returns .sum() but I can't seem to make the code any faster than it is. This is the code: http://code.activestate.com/recipes/578390-snowf