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:
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._
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
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