On Thu, May 23, 2013 at 3:57 PM, Matthieu Brucher
<matthieu.bruc...@gmail.com> wrote:
> In my point of view, you should never use an output argument equal to an
> input argument. It can impede a lot of optimizations.

This is a fine philosophy in some cases, but a non-starter in others.
Python doesn't have optimizations in the first place, and in-place
operations are often critical for managing memory usage. '+=' is an
important operator, and in numpy it's just 'np.add(a, b, out=a)' under
the hood.

On Thu, May 23, 2013 at 3:50 PM, Nicolas Rougier
<nicolas.roug...@inria.fr> wrote:
> Also, from a user point of view it is difficult to sort out which functions 
> currently allow 'out=a' or  out=b' since nothing in the 'dot' documentation 
> warned me about such problem.

That's because AFAIK all functions allow out=a and out=b, except for
those which contain bugs :-).

Can you file a bug in the bug tracker so this won't get lost?

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

Reply via email to