[Numpy-discussion] Proposed deprecations for 1.10: dot corner cases

Stephan Hoyer shoyer at gmail.com
Mon May 11 23:13:24 EDT 2015

On Mon, May 11, 2015 at 2:53 PM, Alan G Isaac <alan.isaac at gmail.com> wrote:

> I agree that where `@` and `dot` differ in behavior, this should be
> clearly documented.
> I would hope that the behavior of `dot` would not change.

Even if np.dot never changes (and indeed, perhaps it should not), issuing
these warnings seems like a good idea to me, once we have @ implemented
with the new behavior (and the @ operator backported from Python <3.5 as a
numpy function).

I expect that this warning would serve the useful purpose of reminding
users writing code intended to be used on earlier versions of numpy/python
that @ and np.dot don't work exactly the same way. As Nathaniel already
mentioned, it is quite straightforward to implement the "outer product"
behavior using the new @ behavior, so it will not be much of a hassle to
update code to remove the warning.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150511/73db5081/attachment.html>

More information about the NumPy-Discussion mailing list