What I'm trying to do is provide a GUI for displaying some numpy
arrays, and wire up IPython so you can manipulate the data however you like. I have all the IPython stuff working, the problem is how to detect that the array changed.
The obvious solution is to explicitly call some sort of refresh()
but I want immediate feedback. Drawing the GUI is expensive (several seconds) so I can't redraw on a timer. However, I can look at the data on a timer, and redraw if it changed.
I saw an answer about hashing the whole ndarray
which is helpful, but my arrays are a bit too large, and the hash too slow. I don't strictly need a hash, because I don't plan on caching or storing some particular array.
Can I get numpy to keep track of its own "dirty" flag? Or, is there some property that would have a different id
or something after mutating the array?