Skip to content

Commit

Permalink
Update utils.h
Browse files Browse the repository at this point in the history
  • Loading branch information
mtsokol committed Sep 9, 2023
1 parent 1f6a47f commit 2f08ba1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 34 deletions.
32 changes: 0 additions & 32 deletions numpy/_core/include/numpy/oldnumeric.h

This file was deleted.

6 changes: 5 additions & 1 deletion numpy/_core/include/numpy/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@
static PyObject *_npy_import_numpy_multiarray_umath()
{
PyObject *multiarray = PyImport_ImportModule("numpy._core._multiarray_umath");
if (multiarray == NULL) {
if (
multiarray == NULL &&
PyErr_ExceptionMatches(PyExc_ModuleNotFoundError)
) {
PyErr_Clear();
multiarray = PyImport_ImportModule("numpy.core._multiarray_umath");
}
return multiarray;
Expand Down
1 change: 0 additions & 1 deletion numpy/_core/src/common/npy_ctypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include <Python.h>

#include "npy_import.h"
#include "numpy/utils.h"

/*
* Check if a python type is a ctypes class.
Expand Down

0 comments on commit 2f08ba1

Please sign in to comment.