summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Goldbaum <nathan.goldbaum@gmail.com>2023-03-20 10:00:15 -0600
committerNathan Goldbaum <nathan.goldbaum@gmail.com>2023-03-20 10:00:15 -0600
commita1339de171f484651b792eba04b1355acc2a892f (patch)
tree4b5c470f5639403fa267724932aaf3e344b19cb5
parent5ae51e23587faa3bd58ed889fed9871f618d3ca1 (diff)
downloadnumpy-a1339de171f484651b792eba04b1355acc2a892f.tar.gz
MAINT: move npy_dtype_info definition back to descriptor.h
-rw-r--r--numpy/core/src/common/ucsnarrow.c1
-rw-r--r--numpy/core/src/multiarray/common.h12
-rw-r--r--numpy/core/src/multiarray/descriptor.h12
-rw-r--r--numpy/core/src/multiarray/iterators.c2
-rw-r--r--numpy/core/src/multiarray/scalarapi.c1
-rw-r--r--numpy/core/src/multiarray/scalartypes.c.src1
-rw-r--r--numpy/core/src/multiarray/shape.c1
-rw-r--r--numpy/core/src/umath/reduction.c1
8 files changed, 13 insertions, 18 deletions
diff --git a/numpy/core/src/common/ucsnarrow.c b/numpy/core/src/common/ucsnarrow.c
index adf441a12..4bea4beee 100644
--- a/numpy/core/src/common/ucsnarrow.c
+++ b/numpy/core/src/common/ucsnarrow.c
@@ -10,7 +10,6 @@
#include "npy_config.h"
#include "npy_pycompat.h"
-#include "common.h"
#include "ctors.h"
/*
diff --git a/numpy/core/src/multiarray/common.h b/numpy/core/src/multiarray/common.h
index 506bf4fef..4e067b22c 100644
--- a/numpy/core/src/multiarray/common.h
+++ b/numpy/core/src/multiarray/common.h
@@ -360,16 +360,4 @@ new_array_for_sum(PyArrayObject *ap1, PyArrayObject *ap2, PyArrayObject* out,
*/
#define NPY_ITER_REDUCTION_AXIS(axis) (axis + (1 << (NPY_BITSOF_INT - 2)))
-/*
- * In some API calls we wish to allow users to pass a DType class or a
- * dtype instances with different meanings.
- * This struct is mainly used for the argument parsing in
- * `PyArray_DTypeOrDescrConverter`.
- */
-typedef struct {
- PyArray_DTypeMeta *dtype;
- PyArray_Descr *descr;
-} npy_dtype_info;
-
-
#endif /* NUMPY_CORE_SRC_MULTIARRAY_COMMON_H_ */
diff --git a/numpy/core/src/multiarray/descriptor.h b/numpy/core/src/multiarray/descriptor.h
index 9f7d2a2fd..b14edc3aa 100644
--- a/numpy/core/src/multiarray/descriptor.h
+++ b/numpy/core/src/multiarray/descriptor.h
@@ -2,6 +2,18 @@
#define NUMPY_CORE_SRC_MULTIARRAY_DESCRIPTOR_H_
+/*
+ * In some API calls we wish to allow users to pass a DType class or a
+ * dtype instances with different meanings.
+ * This struct is mainly used for the argument parsing in
+ * `PyArray_DTypeOrDescrConverter`.
+ */
+typedef struct {
+ PyArray_DTypeMeta *dtype;
+ PyArray_Descr *descr;
+} npy_dtype_info;
+
+
NPY_NO_EXPORT int
PyArray_DTypeOrDescrConverterOptional(PyObject *, npy_dtype_info *dt_info);
diff --git a/numpy/core/src/multiarray/iterators.c b/numpy/core/src/multiarray/iterators.c
index 8a4027bfc..4e6418bf9 100644
--- a/numpy/core/src/multiarray/iterators.c
+++ b/numpy/core/src/multiarray/iterators.c
@@ -14,8 +14,8 @@
#include "arrayobject.h"
#include "iterators.h"
-#include "common.h"
#include "ctors.h"
+#include "common.h"
#include "conversion_utils.h"
#include "array_coercion.h"
diff --git a/numpy/core/src/multiarray/scalarapi.c b/numpy/core/src/multiarray/scalarapi.c
index 62479eabb..40f1da2c4 100644
--- a/numpy/core/src/multiarray/scalarapi.c
+++ b/numpy/core/src/multiarray/scalarapi.c
@@ -14,7 +14,6 @@
#include "npy_pycompat.h"
-#include "common.h"
#include "ctors.h"
#include "descriptor.h"
#include "scalartypes.h"
diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src
index 51822276e..17163ef09 100644
--- a/numpy/core/src/multiarray/scalartypes.c.src
+++ b/numpy/core/src/multiarray/scalartypes.c.src
@@ -17,7 +17,6 @@
#include "npy_config.h"
#include "mapping.h"
-#include "common.h"
#include "ctors.h"
#include "usertypes.h"
#include "numpyos.h"
diff --git a/numpy/core/src/multiarray/shape.c b/numpy/core/src/multiarray/shape.c
index 1ae314bad..25af43bbc 100644
--- a/numpy/core/src/multiarray/shape.c
+++ b/numpy/core/src/multiarray/shape.c
@@ -14,7 +14,6 @@
#include "npy_pycompat.h"
-#include "common.h"
#include "ctors.h"
#include "shape.h"
diff --git a/numpy/core/src/umath/reduction.c b/numpy/core/src/umath/reduction.c
index 188039e1a..9416e9a29 100644
--- a/numpy/core/src/umath/reduction.c
+++ b/numpy/core/src/umath/reduction.c
@@ -20,7 +20,6 @@
#include "array_assign.h"
#include "array_coercion.h"
#include "array_method.h"
-#include "common.h"
#include "ctors.h"
#include "numpy/ufuncobject.h"