diff options
| author | Mark <mwwiebe@gmail.com> | 2011-08-31 11:20:52 -0700 |
|---|---|---|
| committer | Mark <mwwiebe@gmail.com> | 2011-08-31 11:20:52 -0700 |
| commit | 98ccad69e870ac35c20f0130586c70448d315134 (patch) | |
| tree | f2b730496980befb9e9179b9949fc861083dbc95 | |
| parent | 1af2f37eae78986b370e2d44df6c5156945d69d8 (diff) | |
| parent | e411631e136bcdf53ef421102d8cb989beaacf08 (diff) | |
| download | numpy-98ccad69e870ac35c20f0130586c70448d315134.tar.gz | |
Merge pull request #149 from 87/ref-fix
Bugfix in PyArray_SetBaseObject
| -rw-r--r-- | numpy/core/src/multiarray/arrayobject.c | 2 | ||||
| -rw-r--r-- | numpy/core/tests/test_maskna.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c index f79bf1737..27f2b7ef5 100644 --- a/numpy/core/src/multiarray/arrayobject.c +++ b/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 */ diff --git a/numpy/core/tests/test_maskna.py b/numpy/core/tests/test_maskna.py index bbda9f5fa..6d7ded27a 100644 --- a/numpy/core/tests/test_maskna.py +++ b/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)) |
