array manipulation without for loops

Sheldon shejo284 at gmail.com
Sun Jun 25 12:06:18 EDT 2006


Hi,

I have two arrays that are of the same dimension but having 3 different
values: 255, 1 or 2.
I would like to set all the positions in both arrays having 255 to be
equal, i.e., where one array has 255, I set the same elements in the
other array to 255 and visa versa. Does anyone know how to do this
without using for loops?

Sincerely,
Sheldon




More information about the Python-list mailing list