[Numpy-discussion] numpy array change notifier?
Mon Oct 27 15:54:09 CDT 2008
Is there any straightforward way of notifying on change of a numpy
array that leaves the numpy arrays still efficient?
That is, I would like to do the following:
self.arr = arr
#what code do put here?
print 'do something fun and exciting'
>>>o = C(array([1,2,3,4]))
>>>print o.arr #just print the array
[1 2 3 4]
>>>edarr = o.arr
>>>edarr = 10 #this should now call the notify method
do something fun and exciting
[1 2 10 4]
So is there a means of registering the array or, failing that, setting
up the class so that all the numpy tricks work with o.arr[whatever]
while allowing me to implement a property that calls the notifier?
More information about the Numpy-discussion