summaryrefslogtreecommitdiff
path: root/numpy/core/src
diff options
context:
space:
mode:
authorToon Verstraelen <Toon.Verstraelen@UGent.be>2014-10-04 15:54:09 -0400
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-10-05 01:03:58 +0200
commit8615d5e57c7f07c41f5f5c87d3b8ab6da4bfb4ec (patch)
tree7b514d9544c55fcea562380fc9af6ec509361ceb /numpy/core/src
parent43ca904f79ced66552ff02e7e92da1c4566beadd (diff)
downloadnumpy-8615d5e57c7f07c41f5f5c87d3b8ab6da4bfb4ec.tar.gz
BUG: fixed #5147 collapsingbug in einsum
Diffstat (limited to 'numpy/core/src')
-rw-r--r--numpy/core/src/multiarray/einsum.c.src2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/einsum.c.src b/numpy/core/src/multiarray/einsum.c.src
index b3148f573..3f47ec1f4 100644
--- a/numpy/core/src/multiarray/einsum.c.src
+++ b/numpy/core/src/multiarray/einsum.c.src
@@ -2234,7 +2234,7 @@ get_combined_dims_view(PyArrayObject *op, int iop, char *labels)
else {
/* Update the combined axis dimensions and strides */
i = idim + combineoffset;
- if (combineoffset < 0 &&
+ if (combineoffset < 0 && new_dims[i] != 0 &&
new_dims[i] != PyArray_DIM(op, idim)) {
PyErr_Format(PyExc_ValueError,
"dimensions in operand %d for collapsing "