Skip to content

Commit

Permalink
MAINT: PyArray_BASE is not an lvalue unless the deprecated API is used.
Browse files Browse the repository at this point in the history
Use PyArray_SetBaseObject for numpy 1.7 and up and use the older
API for numpy 1.6.2.

fixes scipygh-4719
  • Loading branch information
ewmoore committed Apr 13, 2015
1 parent 33af809 commit 7f2f092
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scipy/signal/lfilter.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,14 @@ scipy_signal_sigtools_linear_filter(PyObject * NPY_UNUSED(dummy), PyObject * arg
goto fail;
}
/* Give our reference to arVi to arVi_view */
#if NPY_API_VERSION >= 0x00000007
if (PyArray_SetBaseObject(arVi_view, arVi) == -1) {
Py_DECREF(arVi_view);
goto fail;
}
#else
PyArray_BASE(arVi_view) = arVi;
#endif
arVi = arVi_view;
}

Expand Down

0 comments on commit 7f2f092

Please sign in to comment.