On Fri, Mar 11, 2011 at 12:37 PM, Pauli Virtanen <p...@iki.fi> wrote:
> On Fri, 11 Mar 2011 11:47:58 -0700, Charles R Harris wrote: > [clip] > > What about views? Wouldn't it be easier to write another object wrapping > > an ndarray? > > I think the buffer interfaces and all other various ways Numpy provides > exports for arrays make keeping tabs on modification impossible to do > completely reliably. > > I didn't mean wrap, as in subclass, I meant wrap in the sense of having ndarray as a private component in a class. One could maybe make a class factory that made a wholly new class for every freshly instanced monitor object and access info could be kept in class variables. Every instance of the generated class would essentially be a view of a single ndarray instance. I don't think all possible accesses could be caught, but for the purposes of mc something less perfect would probably serve. Chuck
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion