[Numpy-discussion] Setter on array

Nathaniel Smith njs at pobox.com
Fri Aug 16 05:50:15 EDT 2013


On 14 Aug 2013 14:37, "Hugo Gagnon" <opensource.numpy at 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.python.org/pipermail/numpy-discussion/attachments/20130816/7330e869/attachment.html>


More information about the NumPy-Discussion mailing list