Sturla Molden wrote: >>Good point. I guess I thought the OP had tried that already. It turns >>out it works fine, too. >> >>The __array_finalize__ is useful if you want the attribute to be carried >>around when arrays are created automatically internally (after math >>operations for example). >> >> > >I too may be missing something here. > >Will using __array_finalize__ this way be thread safe or not? > > Yes because __array_finalize__ is called while NumPy owns the GIL. It is called in one place during array creation (in the C routine that all array-creation routines call).
-Travis _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion