Hi,

I'm wondering whether i can re-write the following idiom with numpy arrays:

for i in some_list:
   i.some_attr = some_value

it would be wonderful if one was able to write this idiom as

arr[just_these].some_attr = some_value
or
setattr(arr[just_these], 'some_attr', some_value)

since often expensive loops through lists of object could be avoided.

any thoughts on this are much appreciated,

thanks,

-jelle

_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to