From 39402815350257cab421975d31bd99a96afb3151 Mon Sep 17 00:00:00 2001 From: Daniel Lawrence Date: Sat, 2 Mar 2019 13:11:36 +0000 Subject: DOC: Removed incorrect claim regarding shape constraints for np.tensordot() --- numpy/core/numeric.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'numpy/core/numeric.py') diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 386049410..1944ce4c7 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1203,20 +1203,18 @@ def _tensordot_dispatcher(a, b, axes=None): @array_function_dispatch(_tensordot_dispatcher) def tensordot(a, b, axes=2): """ - Compute tensor dot product along specified axes for arrays >= 1-D. + Compute tensor dot product along specified axes. - Given two tensors (arrays of dimension greater than or equal to one), - `a` and `b`, and an array_like object containing two array_like - objects, ``(a_axes, b_axes)``, sum the products of `a`'s and `b`'s - elements (components) over the axes specified by ``a_axes`` and - ``b_axes``. The third argument can be a single non-negative - integer_like scalar, ``N``; if it is such, then the last ``N`` - dimensions of `a` and the first ``N`` dimensions of `b` are summed - over. + Given two tensors,`a` and `b`, and an array_like object containing + two array_like objects, ``(a_axes, b_axes)``, sum the products of + `a`'s and `b`'s elements (components) over the axes specified by + ``a_axes`` and ``b_axes``. The third argument can be a single non-negative + integer_like scalar, ``N``; if it is such, then the last ``N``dimensions + of `a` and the first ``N`` dimensions of `b` are summed over. Parameters ---------- - a, b : array_like, len(shape) >= 1 + a, b : array_like Tensors to "dot". axes : int or (2,) array_like -- cgit v1.2.1 From 3e8818c0f3b19d76015d1ae0478a8b50701bd4b4 Mon Sep 17 00:00:00 2001 From: Daniel Lawrence Date: Sat, 2 Mar 2019 16:12:03 +0000 Subject: Fix spacing issue in tensordot docstring --- numpy/core/numeric.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'numpy/core/numeric.py') diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 1944ce4c7..42fee4eb7 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -1205,11 +1205,11 @@ def tensordot(a, b, axes=2): """ Compute tensor dot product along specified axes. - Given two tensors,`a` and `b`, and an array_like object containing + Given two tensors, `a` and `b`, and an array_like object containing two array_like objects, ``(a_axes, b_axes)``, sum the products of `a`'s and `b`'s elements (components) over the axes specified by ``a_axes`` and ``b_axes``. The third argument can be a single non-negative - integer_like scalar, ``N``; if it is such, then the last ``N``dimensions + integer_like scalar, ``N``; if it is such, then the last ``N`` dimensions of `a` and the first ``N`` dimensions of `b` are summed over. Parameters -- cgit v1.2.1