summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2013-12-16 17:42:17 +0100
committerSebastian Berg <sebastian@sipsolutions.net>2014-02-06 17:52:00 +0100
commite0b28df9fa386b6aa8f439a5949e984c90a8320d (patch)
tree2bad8d3d3f6d3b2068fc3887bbcf5352bc21162e
parent4e92b2b4d6a8e09dbbc659fa1a721550c7bd9c8d (diff)
downloadnumpy-e0b28df9fa386b6aa8f439a5949e984c90a8320d.tar.gz
MAINT: move npy_index_info into mapping.h
-rw-r--r--numpy/core/include/numpy/ndarraytypes.h17
-rw-r--r--numpy/core/src/multiarray/mapping.h21
2 files changed, 20 insertions, 18 deletions
diff --git a/numpy/core/include/numpy/ndarraytypes.h b/numpy/core/include/numpy/ndarraytypes.h
index e38eb4a18..27970ff77 100644
--- a/numpy/core/include/numpy/ndarraytypes.h
+++ b/numpy/core/include/numpy/ndarraytypes.h
@@ -1257,23 +1257,6 @@ typedef struct {
/*
- * Struct into which indices are parsed.
- * I.e. integer ones should only be parsed once, slices and arrays
- * need to be validated later and for the ellipsis we need to find how
- * many slices it represents.
- */
-typedef struct {
- /*
- * Object of index: slice, array, or NULL. Owns a reference.
- */
- PyObject *object;
- /* Value of an integer index or number of slices an Ellipsis is worth */
- npy_intp value;
- int type; /* kind of index, see magic values in mapping.c */
-} npy_index_info;
-
-
-/*
* Store the information needed for fancy-indexing over an array. The
* fields are slightly unordered to keep consec, dataptr and subspace
* where they were originally.
diff --git a/numpy/core/src/multiarray/mapping.h b/numpy/core/src/multiarray/mapping.h
index 849872923..a1daf82ca 100644
--- a/numpy/core/src/multiarray/mapping.h
+++ b/numpy/core/src/multiarray/mapping.h
@@ -7,6 +7,25 @@ extern NPY_NO_EXPORT PyMappingMethods array_as_mapping;
NPY_NO_EXPORT PyMappingMethods array_as_mapping;
#endif
+
+/*
+ * Struct into which indices are parsed.
+ * I.e. integer ones should only be parsed once, slices and arrays
+ * need to be validated later and for the ellipsis we need to find how
+ * many slices it represents.
+ */
+typedef struct {
+ /*
+ * Object of index: slice, array, or NULL. Owns a reference.
+ */
+ PyObject *object;
+ /* Value of an integer index or number of slices an Ellipsis is worth */
+ npy_intp value;
+ /* kind of index, see constants in mapping.c */
+ int type;
+} npy_index_info;
+
+
NPY_NO_EXPORT Py_ssize_t
array_length(PyArrayObject *self);
@@ -48,7 +67,7 @@ NPY_NO_EXPORT PyObject*
PyArray_MapIterNew(npy_index_info *indices , int index_num, int index_type,
int ndim, int fancy_ndim,
PyArrayObject *arr, PyArrayObject *subspace,
- npy_uint32 subspace_iter_flags,npy_uint32 subspace_flags,
+ npy_uint32 subspace_iter_flags, npy_uint32 subspace_flags,
npy_uint32 extra_op_flags, PyArrayObject *extra_op,
PyArray_Descr *extra_op_dtype);
#endif