[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] array search



> I had an 2d array maked of 1s and 0s, is there a way
> to get the indexes of every element in the array with
> value 1? without iterating throught the array using
> Python "for"?

Are you stuck with that array format? If the array wasn't too wide you
could use bit flags and bitwise or them together for each row.

Alan