summaryrefslogtreecommitdiff
path: root/numpy/numarray
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/numarray')
-rw-r--r--numpy/numarray/_capi.c2
-rw-r--r--numpy/numarray/include/numpy/libnumarray.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/numarray/_capi.c b/numpy/numarray/_capi.c
index 875e383ea..534057095 100644
--- a/numpy/numarray/_capi.c
+++ b/numpy/numarray/_capi.c
@@ -3402,7 +3402,7 @@ PyMODINIT_FUNC init_capi(void)
_Error = PyErr_NewException("numpy.numarray._capi.error", NULL, NULL);
/* Create a CObject containing the API pointer array's address */
-#if PY_VERSION_HEX >= 0x03010000
+#if PY_VERSION_HEX >= 0x02070000
m = PyModule_Create(&moduledef);
c_api_object = PyCapsule_New((void *)libnumarray_API, NULL, NULL);
if (c_api_object == NULL) {
diff --git a/numpy/numarray/include/numpy/libnumarray.h b/numpy/numarray/include/numpy/libnumarray.h
index 738b5f1cc..08fe159f7 100644
--- a/numpy/numarray/include/numpy/libnumarray.h
+++ b/numpy/numarray/include/numpy/libnumarray.h
@@ -40,7 +40,7 @@ static void **libnumarray_API;
#endif
#endif
-#if PY_VERSION_HEX >= 0x03010000
+#if PY_VERSION_HEX >= 0x02070000
#define _import_libnumarray() \
{ \
PyObject *module = PyImport_ImportModule("numpy.numarray._capi"); \