summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMattHarrigan <harrigan.matthew@gmail.com>2016-10-14 15:06:53 -0400
committerMattHarrigan <harrigan.matthew@gmail.com>2016-10-14 15:06:53 -0400
commit858574468a8667486dfad5d66e83f74fbe5ed91b (patch)
treecf8f8a7ac8c82df2b78ef6aa74aa6079d4b83c85
parentee41e9dfd2a0a6241e0d9e95fb355bfc92383fea (diff)
downloadnumpy-858574468a8667486dfad5d66e83f74fbe5ed91b.tar.gz
DOC: added example with empty indices for a scalar
-rw-r--r--numpy/core/einsumfunc.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/core/einsumfunc.py b/numpy/core/einsumfunc.py
index 97eb7924f..0b15c213b 100644
--- a/numpy/core/einsumfunc.py
+++ b/numpy/core/einsumfunc.py
@@ -863,6 +863,9 @@ def einsum(*operands, **kwargs):
>>> np.einsum('..., ...', 3, c)
array([[ 0, 3, 6],
[ 9, 12, 15]])
+ >>> np.einsum(',ij', 3, C)
+ array([[ 0, 3, 6],
+ [ 9, 12, 15]])
>>> np.einsum(3, [Ellipsis], c, [Ellipsis])
array([[ 0, 3, 6],
[ 9, 12, 15]])