summaryrefslogtreecommitdiff
path: root/numpy/core/multiarray.py
diff options
context:
space:
mode:
authorPetar Mlinarić <petar.mlinaric@gmail.com>2022-07-18 04:59:54 -0500
committerGitHub <noreply@github.com>2022-07-18 12:59:54 +0300
commit92680b65331c44e4bdcdc9d0c593bc4d509a3981 (patch)
treec381316d30197dfe0d6dce56f7626710dd001fc9 /numpy/core/multiarray.py
parent64707310d563a81434778cfc4e57d95aac6a77a7 (diff)
downloadnumpy-92680b65331c44e4bdcdc9d0c593bc4d509a3981.tar.gz
DOC: add links to `linalg` in docs of `dot` and `matmul` (#22002)
Add links to `linalg` explaining BLAS
Diffstat (limited to 'numpy/core/multiarray.py')
-rw-r--r--numpy/core/multiarray.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/numpy/core/multiarray.py b/numpy/core/multiarray.py
index 65b7cb46d..2d0725e2f 100644
--- a/numpy/core/multiarray.py
+++ b/numpy/core/multiarray.py
@@ -750,17 +750,21 @@ def dot(a, b, out=None):
- If both `a` and `b` are 2-D arrays, it is matrix multiplication,
but using :func:`matmul` or ``a @ b`` is preferred.
- - If either `a` or `b` is 0-D (scalar), it is equivalent to :func:`multiply`
- and using ``numpy.multiply(a, b)`` or ``a * b`` is preferred.
+ - If either `a` or `b` is 0-D (scalar), it is equivalent to
+ :func:`multiply` and using ``numpy.multiply(a, b)`` or ``a * b`` is
+ preferred.
- If `a` is an N-D array and `b` is a 1-D array, it is a sum product over
the last axis of `a` and `b`.
- If `a` is an N-D array and `b` is an M-D array (where ``M>=2``), it is a
- sum product over the last axis of `a` and the second-to-last axis of `b`::
+ sum product over the last axis of `a` and the second-to-last axis of
+ `b`::
dot(a, b)[i,j,k,m] = sum(a[i,j,:] * b[k,:,m])
+ It uses an optimized BLAS library when possible (see `numpy.linalg`).
+
Parameters
----------
a : array_like