[Numpy-discussion] Two questions about PEP 465 dot product

Nathaniel Smith njs at pobox.com
Fri May 22 17:47:54 EDT 2015


On May 22, 2015 2:40 PM, "Benjamin Root" <ben.root at ou.edu> wrote:
>
> Then add in broadcasting behavior...

Vectorized functions broadcast over the vectorized dimensions, there's
nothing special about @ in this regard.

-n

> On Fri, May 22, 2015 at 4:58 PM, Nathaniel Smith <njs at pobox.com> wrote:
>>
>> On May 22, 2015 1:26 PM, "Benjamin Root" <ben.root at ou.edu> wrote:
>> >
>> > That assumes that the said recently-confused ever get to the point of
understanding it...
>>
>> Well, I don't think it's that complicated really. For whatever that's
worth :-). My best attempt is here, anyway:
>>
>>   https://www.python.org/dev/peps/pep-0465/#semantics
>>
>> The short version is, for 1d and 2d inputs it acts just like dot(). For
higher dimension inputs like (i, j, n, m) it acts like any other gufunc
(e.g., everything in np.linalg) -- it treats this as an i-by-j stack of
n-by-m matrices and is vectorized over the i, j dimensions. And 0d inputs
are an error.
>>
>> -n
>>
>>
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150522/52e8bae6/attachment.html>


More information about the NumPy-Discussion mailing list