Hi All,

It turns out that gufuncs will broadcast the last dimension if it is one.
For instance, inner1d has signature `(n), (n) -> ()`, yet

In [27]: inner1d([1,1,1], [1])
Out[27]: 3

In [28]: inner1d([1,1,1], [1,1])
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-28-e53e62e35349> in <module>()
----> 1 inner1d([1,1,1], [1,1])

ValueError: inner1d: Operand 1 has a mismatch in its core dimension 0, with
gufunc signature (i),(i)->() (size 2 is different from 3)


I'd think this is a bug, as the dimensions should match. Note that scalar 1
will be promoted to [1] in this case.

Thoughts?

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

Reply via email to