[Numpy-discussion] add axis to results of reduction (mean, min, ...)
Charles R Harris
Thu Aug 6 11:58:06 CDT 2009
On Thu, Aug 6, 2009 at 9:55 AM, <firstname.lastname@example.org> wrote:
> What's the best way of getting back the correct shape to be able to
> broadcast, mean, min,.. to the original array, that works for
> arbitrary dimension and axis?
> I thought I have seen some helper functions, but I don't find them anymore?
Adding a keyword to retain the number of dimensions has been mooted. It
shouldn't be too difficult to implement and would allow things like:
>>> scaled = a/a.max(1, reduce=0)
I could do that for 1.4 if folks are interested.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion