[Numpy-discussion] write access through iterator

Neal Becker ndbecker2@gmail....
Wed Jun 22 13:33:58 CDT 2011


Maybe I'm being dense today, but I don't see how to iterate over arrays with 
write access.  You could read through iterators like:

fl = u.flat
>>> for item in fl:
...     print item

but you can't do

for item in fl:
  item = 10

(or, it won't do what you want).

Is there any way to do this?



More information about the NumPy-Discussion mailing list