[Numpy-discussion] A numpy accumulator...
Sat Oct 3 17:08:38 CDT 2009
Gökhan Sever wrote:
> Thanks for working on this. This append() method is a very handy for me,
> when working with lists. It is exiting to hear that it will be ported to
> ndarrays as well.
not exactly ported -- this will be a special, limited-use class.
> Any plans for insert() ?
I wouldn't say I have any plans at all -- but yes, insert() would be good.
Dag Sverre Seljebotn wrote:
> I'd drop the __getslice__ as it is deprecated (in Python 3 it is
> removed). Slices will be passed as "slice" objects to __getitem__ if you
> don't provide __getslice__.
I noticed that, but didn't know about the deprecation -- I'll refactor that.
> One could support myaccumulator[[1,2,3]] as well in __getitem__,
> although I guess it gets a little hairy as you must seek through the
> array-like object passed and see to it that no values are too large.
well, it wouldn't hard, though it might be slow...I'll give it a try and
see how it works out.
Christopher Barker, Ph.D.
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
More information about the NumPy-Discussion