|
From: Pierre GM <pgm...@gm...> - 2008-04-08 16:58:04
|
On Tuesday 08 April 2008 10:46:32 Bryan Fodness wrote:
> I am starting with a zero array, populate it according to some
> condition, save the graph, and then reset the array to zero. Can
> someone tell me if there is a better (faster) way to do this?
My 2c:
* Use inplace addition to save some space
while something:
....
if something:
if something:
a[y,x] += 1
* To set all the values to 0:
a.flat = 0
|