[Numpy-discussion] Setting contents of buffer for array object

Matthew Brett matthew.brett@gmail....
Mon Feb 11 03:31:29 CST 2008


> I can also see that this could possibly be improved by using a for
> loop to iterate over the output elements, so that there was no need to
> duplicate the large input array, or perhaps a "blocked" iteration that
> duplicated arrays of modest size would be better. But how can a single
> float per data set whose median is being taken help?

Sorry, you are right to call me on this very sloppy late-night
phrasing - I only meant that it would be useful in due course to use a
C implementation for median such as the ones you're describing, and
that this could write the result directly into the in-place memory -
in the same way that mean() does.  It's quite true that it's difficult
to imagine the algorithm itself benefiting from the memory buffer.



More information about the Numpy-discussion mailing list