Re: [Numpy-discussion] numpy.sum(..., keepdims=False)

2012-04-04 Thread Pierre Haessig
Hi,

Le 03/04/2012 22:10, Frédéric Bastien a écrit :
 I would like to add this parameter to Theano. So my question is, will
 the interface change or is it stable?
I don't know for the stability, but for the existence of this new parameter:

https://github.com/numpy/numpy/blob/master/numpy/core/fromnumeric.py

looking at def sum(...) it seems the keepdims=False parameter is here
and was introduced 7 months ago by Mark Wiebe and Charles Harris.

The docstring indeed says :
keepdims : bool, optional
If this is set to True, the axes which are reduced are left
in the result as dimensions with size one. With this option,
the result will broadcast correctly against the original `arr`.

The commit message also mentions the skipna parameter, which is part of
the overall NA implementation which is indeed tagged as somehow
experimental (if I'm correct ! ), but I would assume that the
keepdims=False parameter is an orthogonal issue. Hopefully somebody can
give you a more precise answer !

Best,
Pierre



signature.asc
Description: OpenPGP digital signature
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] numpy.sum(..., keepdims=False)

2012-04-04 Thread David Warde-Farley
On 2012-04-03, at 4:10 PM, Frédéric Bastien wrote:

 I would like to add this parameter to Theano. So my question is, will
 the interface change or is it stable?

To elaborate on what Fred said, in Theano we try to offer the same 
functions/methods as NumPy does with the same arguments and same behaviour, 
except operating on our symbolic proxies instead of actual NumPy arrays; we try 
to break compatibility only when absolutely necessary. 

It would be great if someone (probably Mark?) could chime in as to whether this 
is here to stay, regardless of the NA business. This also seems like a good 
candidate for a backport to subsequent NumPy 1.x releases rather than reserving 
it for 2.x.

David

___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion