Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Eric Firing
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

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Joe Harrington
> 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

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Robert Kern
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

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Timothy Hochberg
[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

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Charles R Harris
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

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Gary Strangman
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: >

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Robert Kern
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 > >

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Charles R Harris
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

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Travis E. Oliphant
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 [

Re: [Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Robert Kern
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

[Numpy-discussion] Thoughts for 1.1

2008-04-02 Thread Charles R Harris
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