Re: [Numpy-discussion] indexing bug?

2007-09-29 Thread Nadezhda Dencheva
>> This should return an error and not silently truncate to int. > >Why do you say that? I see now this was a Friday afternoon lack of imagination :) The current behaviour is consistent and well >defined: > >On a somewhat related note, you may also be interested in the PEP at > >http://docs.

[Numpy-discussion] setting the attributes of an array of object

2007-09-29 Thread jelle
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 e