Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #149 from 87/ref-fix

Bugfix in PyArray_SetBaseObject
  • Loading branch information...
commit 98ccad69e870ac35c20f0130586c70448d315134 2 parents 1af2f37 + e411631
@mwiebe mwiebe authored
View
2  numpy/core/src/multiarray/arrayobject.c
@@ -102,7 +102,7 @@ PyArray_SetBaseObject(PyArrayObject *arr, PyObject *obj)
* its own data.
*/
while (PyArray_Check(obj) && (PyObject *)arr != obj) {
- PyArrayObject *obj_arr = (PyArrayObject *)arr;
+ PyArrayObject *obj_arr = (PyArrayObject *)obj;
PyObject *tmp;
/* If this array owns its own data, stop collapsing */
View
2  numpy/core/tests/test_maskna.py
@@ -481,7 +481,7 @@ def test_array_maskna_array_function_1D():
# Should produce a view with an owned mask with 'ownmaskna=True'
c = np.array(b_view, copy=False, ownmaskna=True)
- assert_(c.base is b_view)
+ assert_(c.base is b_view.base)
assert_(c.flags.ownmaskna)
assert_(not (c is b_view))
Please sign in to comment.
Something went wrong with that request. Please try again.