Re: [Numpy-discussion] Setter on array

2013-08-16 Thread Christian K.
Hi Hugo, Am 14.08.13 10:34, schrieb Hugo Gagnon: > 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. a one made a simple subclass of ndarray whi

Re: [Numpy-discussion] Setter on array

2013-08-16 Thread Nathaniel Smith
On 14 Aug 2013 14:37, "Hugo Gagnon" 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

Re: [Numpy-discussion] Setter on array

2013-08-16 Thread Pierre Haessig
Hi Hugo, Le 14/08/2013 15:34, Hugo Gagnon a écrit : > 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. I've never seen such a signal mechanism s

[Numpy-discussion] Setter on array

2013-08-14 Thread Hugo Gagnon
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. Thanks, -- Hugo Gagnon ___ NumPy-Discussion mai