[Numpy-discussion] Setter on array

Nathaniel Smith njs@pobox....
Fri Aug 16 04:50:15 CDT 2013


On 14 Aug 2013 14:37, "Hugo Gagnon" <opensource.numpy@user.fastmail.fm>
wrote:
>
> Hi,
>
> What is the best way, if any, to "do something" whenever array elements
> are changed in-place?  For example, if I have a = arange(10), then
> setting a[3] = 1 would, say, call a function automatically.

There isn't really any reliable way to do this.

-n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20130816/7330e869/attachment.html 


More information about the NumPy-Discussion mailing list