[Numpy-discussion] Thoughts for 1.1
Eric Firing
efiring@hawaii....
Wed Apr 2 18:34:19 CDT 2008
Robert Kern wrote:
> On undefined, Timothy Hochberg <tim.hochberg@ieee.org> 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', so the signature would be a:
>> mean(axis=None, dtype=None, out=None, reduce=True).
>
> I imagine we would end up adding this capability to the .reduce()
> method of all binary ufuncs, so 'reduce' seems ... odd. 'keeprank'?
>
What is maintained is the ndim attribute, so how about "keepndim"?
Or, how about "squeeze=True" for the present behavior, "squeeze=False"
for the new option? The only ambiguity would be whether "squeeze=True"
is equivalent to calling the squeeze method, which should not be the
case. I don't think this ambiguity in the terminology would cause much
trouble in practice.
Eric
More information about the Numpy-discussion
mailing list