Skip to content

Commit

Permalink
Merge pull request #149 from 87/ref-fix
Browse files Browse the repository at this point in the history
Bugfix in PyArray_SetBaseObject
  • Loading branch information
mwiebe committed Aug 31, 2011
2 parents 1af2f37 + e411631 commit 98ccad6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion numpy/core/src/multiarray/arrayobject.c
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion numpy/core/tests/test_maskna.py
Expand Up @@ -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))

Expand Down

0 comments on commit 98ccad6

Please sign in to comment.