Skip to content

Commit

Permalink
ENH: Make einsum return a writeable view whenever the input is writea…
Browse files Browse the repository at this point in the history
…ble.
  • Loading branch information
insertinterestingnamehere committed Jan 1, 2015
1 parent 061feab commit 59cab3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion numpy/core/src/multiarray/einsum.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -2158,7 +2158,8 @@ get_single_op_view(PyArrayObject *op, int iop, char *labels,
PyArray_DESCR(op),
ndim_output, new_dims, new_strides,
PyArray_DATA(op),
0, (PyObject *)op);
PyArray_ISWRITEABLE(op) ? NPY_ARRAY_WRITEABLE : 0,
(PyObject *)op);

if (*ret == NULL) {
return 0;
Expand Down

0 comments on commit 59cab3e

Please sign in to comment.