[Numpy-discussion] Extending ufunc signature syntax for matmul, frozen dimensions

Stephan Hoyer shoyer at gmail.com
Mon Apr 30 17:33:19 EDT 2018


On Sun, Apr 29, 2018 at 2:48 AM Matti Picus <matti.picus at gmail.com> wrote:

> The  proposed solution to issue #9029 is to extend the meaning of a
> signature so "syntax like (n?,k),(k,m?)->(n?,m?) could mean that n and m
> are optional dimensions; if missing in the input, they're treated as 1, and
> then dropped from the output"


I agree that this is an elegant fix for matmul, but are there other
use-cases for "optional dimensions" in gufuncs?

It feels a little wrong to add gufunc features if we can only think of one
function that can use them.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180430/0d76fd79/attachment.html>


More information about the NumPy-Discussion mailing list