Robert Kern wrote:
> On undefined, Timothy Hochberg <[EMAIL PROTECTED]> wrote:
>
>> As to what to name it, if it did come to pass. I'm not happy 'keepshape'
>> since we'd not actually be keeping the shape, just the number of dimensions.
>> 'keepdims' is better, but still seem awkard. I'd prefer so
> I think it would enhance broadcasting if functions like sum, mean, etc
> didn't change the number of dimensions.
I strongly favor doing it, but with keepshape (or just "keep", to make
it short) and not by default. It's at least as common to take a mean
down an axis of a 2D array and plot it (r
On undefined, Timothy Hochberg <[EMAIL PROTECTED]> wrote:
> As to what to name it, if it did come to pass. I'm not happy 'keepshape'
> since we'd not actually be keeping the shape, just the number of dimensions.
> 'keepdims' is better, but still seem awkard. I'd prefer something like
> 'reduce', s
[SNIP]
The text is getting kind of broken up so I'm chopping it and starting from
scratch.
To the question of whether it's a good idea to change the default behavior
of mean and friends to not reduce over the chosen axis, I have to agree with
Robert: too much code breakage for to little gain, so
On Wed, Apr 2, 2008 at 4:40 PM, Travis E. Oliphant <[EMAIL PROTECTED]>
wrote:
> Charles R Harris wrote:
> > Hi All,
> >
> > I think it would enhance broadcasting if functions like sum, mean, etc
> > didn't change the number of dimensions. For example, suppose one
> > wanted to subtract the mean al
If you're looking for user input ... +1 on having a keepdims capability. I
have myself implemented many such functions with a keepdims=1 keyword. No
real preference on how it's impelemented, though the potential for
breakage is a concern ...
Gary
On Wed, 2 Apr 2008, Charles R Harris wrote:
>
On undefined, Charles R Harris <[EMAIL PROTECTED]> wrote:
>
> On Wed, Apr 2, 2008 at 4:30 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> >
> > On undefined, Charles R Harris <[EMAIL PROTECTED]> wrote:
> > > Hi All,
> > >
> > > I think it would enhance broadcasting if functions like sum, mean, etc
> >
On Wed, Apr 2, 2008 at 4:30 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On undefined, Charles R Harris <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I think it would enhance broadcasting if functions like sum, mean, etc
> > didn't change the number of dimensions. For example, suppose one wanted
Charles R Harris wrote:
> Hi All,
>
> I think it would enhance broadcasting if functions like sum, mean, etc
> didn't change the number of dimensions. For example, suppose one
> wanted to subtract the mean along dimension 2 from the same axis of
> the original array, then something like
>
> In [
On undefined, Charles R Harris <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I think it would enhance broadcasting if functions like sum, mean, etc
> didn't change the number of dimensions. For example, suppose one wanted to
> subtract the mean along dimension 2 from the same axis of the original
> arra
Hi All,
I think it would enhance broadcasting if functions like sum, mean, etc
didn't change the number of dimensions. For example, suppose one wanted to
subtract the mean along dimension 2 from the same axis of the original
array, then something like
In [44]: a = ones((2,3,4,5))
In [45]: a -= a
11 matches
Mail list logo