[Numpy-discussion] Cellular Automata Neighborhoods & Numpy

2011-03-19 Thread Michael Mersky
Hello, I stumbled upon this group tonight ( http://mail.scipy.org/pipermail/numpy-discussion/2010-October/053420.html) while searching Google for examples of Cellular Automata(CA) using Numpy. The "Game of Life Strides" example looks great, but I don't fully comprehend how this example is working:

Re: [Numpy-discussion] BUG: ndarray subclass calls __mul__ when ** (pow) is involved

2011-03-19 Thread Robert Kern
2011/3/19 Dmitrey : > I have ndarray subclass, its instance x and use > r = x**2 > > I expected it will call for each array element > elem.__pow__(2) > but it calls > elem.__mul__(elem) > instead. > > It essentially (tens or even more times) decreases my calculations speed for > lots of cases. x._

[Numpy-discussion] BUG: ndarray subclass calls __mul__ when ** (pow) is involved

2011-03-19 Thread Dmitrey
I have ndarray subclass, its instance x and use r = x**2 I expected it will call for each array element elem.__pow__(2) but it calls elem.__mul__(elem) instead. It essentially (tens or even more times) decreases my calculations speed for lots of cases. >>> numpy.__ver

Re: [Numpy-discussion] Extracting data from genfromtxt?

2011-03-19 Thread Rohaq
On Sat, Mar 19, 2011 at 01:52, Ben Gamari wrote: > On Fri, 18 Mar 2011 20:27:17 +, Rohaq wrote: > > There could be a lot more than 2 other columns, Result3,Result4, etc., > > so I need to code it to be scalable; if this were acting like a normal > > dict, I could write a loop that iterates o