diff options
Diffstat (limited to 'numpy/core/src/multiarray')
54 files changed, 191 insertions, 166 deletions
diff --git a/numpy/core/src/multiarray/_multiarray_tests.c.src b/numpy/core/src/multiarray/_multiarray_tests.c.src index f4764b371..e945d0771 100644 --- a/numpy/core/src/multiarray/_multiarray_tests.c.src +++ b/numpy/core/src/multiarray/_multiarray_tests.c.src @@ -1,8 +1,8 @@ /* -*-c-*- */ #define PY_SSIZE_T_CLEAN +#include <Python.h> #define NPY_NO_DEPRECATED_API NPY_API_VERSION -#include <Python.h> #define _NPY_NO_DEPRECATIONS /* for NPY_CHAR */ #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/abstractdtypes.c b/numpy/core/src/multiarray/abstractdtypes.c index 3fa354ddc..99573f089 100644 --- a/numpy/core/src/multiarray/abstractdtypes.c +++ b/numpy/core/src/multiarray/abstractdtypes.c @@ -1,10 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> - -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/ndarraytypes.h" #include "numpy/arrayobject.h" diff --git a/numpy/core/src/multiarray/alloc.c b/numpy/core/src/multiarray/alloc.c index e74056736..adb4ae128 100644 --- a/numpy/core/src/multiarray/alloc.c +++ b/numpy/core/src/multiarray/alloc.c @@ -1,20 +1,18 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" - +#include <structmember.h> #include <pymem.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE -#include <numpy/ndarraytypes.h> +#include "numpy/ndarraytypes.h" #include "numpy/arrayobject.h" -#include <numpy/npy_common.h> +#include "numpy/npy_common.h" #include "npy_config.h" #include "alloc.h" - #include <assert.h> - #ifdef NPY_OS_LINUX #include <sys/mman.h> #ifndef MADV_HUGEPAGE diff --git a/numpy/core/src/multiarray/array_assign_array.c b/numpy/core/src/multiarray/array_assign_array.c index 665dadfbf..020a7f29a 100644 --- a/numpy/core/src/multiarray/array_assign_array.c +++ b/numpy/core/src/multiarray/array_assign_array.c @@ -6,13 +6,13 @@ * * See LICENSE.txt for the license. */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE -#include <numpy/ndarraytypes.h> +#include "numpy/ndarraytypes.h" #include "npy_config.h" #include "npy_pycompat.h" diff --git a/numpy/core/src/multiarray/array_assign_scalar.c b/numpy/core/src/multiarray/array_assign_scalar.c index 6cd5f4ad9..4ffef7ecc 100644 --- a/numpy/core/src/multiarray/array_assign_scalar.c +++ b/numpy/core/src/multiarray/array_assign_scalar.c @@ -6,12 +6,12 @@ * * See LICENSE.txt for the license. */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include <numpy/ndarraytypes.h> #include "npy_config.h" diff --git a/numpy/core/src/multiarray/array_coercion.c b/numpy/core/src/multiarray/array_coercion.c index 89719f129..90b50097a 100644 --- a/numpy/core/src/multiarray/array_coercion.c +++ b/numpy/core/src/multiarray/array_coercion.c @@ -1,8 +1,9 @@ #define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _UMATHMODULE #define _MULTIARRAYMODULE +#define _UMATHMODULE -#include "Python.h" +#define PY_SSIZE_T_CLEAN +#include <Python.h> #include "numpy/npy_3kcompat.h" diff --git a/numpy/core/src/multiarray/array_method.c b/numpy/core/src/multiarray/array_method.c index 44ba8c733..816c9e271 100644 --- a/numpy/core/src/multiarray/array_method.c +++ b/numpy/core/src/multiarray/array_method.c @@ -26,10 +26,9 @@ * It is then sufficient for a ufunc (or other owner) to only hold a * weak reference to the input DTypes. */ - - #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE + #include <npy_pycompat.h> #include "arrayobject.h" #include "array_method.h" diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c index 55ba5601b..d653bfc22 100644 --- a/numpy/core/src/multiarray/arrayobject.c +++ b/numpy/core/src/multiarray/arrayobject.c @@ -20,13 +20,13 @@ maintainer email: oliphant.travis@ieee.org Space Science Telescope Institute (J. Todd Miller, Perry Greenfield, Rick White) */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -/*#include <stdio.h>*/ -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src index b3ea7544d..c0c087056 100644 --- a/numpy/core/src/multiarray/arraytypes.c.src +++ b/numpy/core/src/multiarray/arraytypes.c.src @@ -1,7 +1,7 @@ /* -*- c -*- */ #define PY_SSIZE_T_CLEAN -#include "Python.h" -#include "structmember.h" +#include <Python.h> +#include <structmember.h> #include <limits.h> #include <assert.h> diff --git a/numpy/core/src/multiarray/buffer.c b/numpy/core/src/multiarray/buffer.c index 5458c81cc..d10122c4f 100644 --- a/numpy/core/src/multiarray/buffer.c +++ b/numpy/core/src/multiarray/buffer.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/calculation.c b/numpy/core/src/multiarray/calculation.c index 21e52c32b..327f685d4 100644 --- a/numpy/core/src/multiarray/calculation.c +++ b/numpy/core/src/multiarray/calculation.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "lowlevel_strided_loops.h" diff --git a/numpy/core/src/multiarray/common.c b/numpy/core/src/multiarray/common.c index 1fd9ab1a3..82d34193d 100644 --- a/numpy/core/src/multiarray/common.c +++ b/numpy/core/src/multiarray/common.c @@ -1,8 +1,9 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "npy_config.h" diff --git a/numpy/core/src/multiarray/common.h b/numpy/core/src/multiarray/common.h index 203decaa0..3251da480 100644 --- a/numpy/core/src/multiarray/common.h +++ b/numpy/core/src/multiarray/common.h @@ -1,6 +1,6 @@ #ifndef _NPY_PRIVATE_COMMON_H_ #define _NPY_PRIVATE_COMMON_H_ -#include "structmember.h" +#include <structmember.h> #include <numpy/npy_common.h> #include <numpy/ndarraytypes.h> #include <limits.h> diff --git a/numpy/core/src/multiarray/common_dtype.c b/numpy/core/src/multiarray/common_dtype.c index 659580c98..ca80b1ed7 100644 --- a/numpy/core/src/multiarray/common_dtype.c +++ b/numpy/core/src/multiarray/common_dtype.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE -#include <numpy/npy_common.h> +#include "numpy/npy_common.h" #include "numpy/arrayobject.h" #include "common_dtype.h" diff --git a/numpy/core/src/multiarray/compiled_base.c b/numpy/core/src/multiarray/compiled_base.c index de793f87c..efe120b80 100644 --- a/numpy/core/src/multiarray/compiled_base.c +++ b/numpy/core/src/multiarray/compiled_base.c @@ -1,9 +1,10 @@ #define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + +#define PY_SSIZE_T_CLEAN #include <Python.h> #include <structmember.h> -#include <string.h> -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/npy_3kcompat.h" #include "numpy/npy_math.h" @@ -15,6 +16,8 @@ #include "common.h" #include "simd/simd.h" +#include <string.h> + typedef enum { PACK_ORDER_LITTLE = 0, PACK_ORDER_BIG diff --git a/numpy/core/src/multiarray/conversion_utils.c b/numpy/core/src/multiarray/conversion_utils.c index adfff1129..6de764fb1 100644 --- a/numpy/core/src/multiarray/conversion_utils.c +++ b/numpy/core/src/multiarray/conversion_utils.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/convert.c b/numpy/core/src/multiarray/convert.c index 2ad8d6d0e..2f68db07c 100644 --- a/numpy/core/src/multiarray/convert.c +++ b/numpy/core/src/multiarray/convert.c @@ -1,11 +1,12 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#include <npy_config.h> +#include "npy_config.h" -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "npy_pycompat.h" diff --git a/numpy/core/src/multiarray/convert_datatype.c b/numpy/core/src/multiarray/convert_datatype.c index 45b03a6f3..b6755e91d 100644 --- a/numpy/core/src/multiarray/convert_datatype.c +++ b/numpy/core/src/multiarray/convert_datatype.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/convert_datatype.h b/numpy/core/src/multiarray/convert_datatype.h index 22b3859d2..e5fc23972 100644 --- a/numpy/core/src/multiarray/convert_datatype.h +++ b/numpy/core/src/multiarray/convert_datatype.h @@ -78,9 +78,9 @@ PyArray_CheckCastSafety(NPY_CASTING casting, NPY_NO_EXPORT NPY_CASTING legacy_same_dtype_resolve_descriptors( PyArrayMethodObject *self, - PyArray_DTypeMeta **dtypes, - PyArray_Descr **given_descrs, - PyArray_Descr **loop_descrs); + PyArray_DTypeMeta *dtypes[2], + PyArray_Descr *given_descrs[2], + PyArray_Descr *loop_descrs[2]); NPY_NO_EXPORT int legacy_cast_get_strided_loop( @@ -92,9 +92,9 @@ legacy_cast_get_strided_loop( NPY_NO_EXPORT NPY_CASTING simple_cast_resolve_descriptors( PyArrayMethodObject *self, - PyArray_DTypeMeta **dtypes, - PyArray_Descr **input_descrs, - PyArray_Descr **loop_descrs); + PyArray_DTypeMeta *dtypes[2], + PyArray_Descr *input_descrs[2], + PyArray_Descr *loop_descrs[2]); NPY_NO_EXPORT int PyArray_InitializeCasts(void); diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index ee8f27ebb..73d864a4d 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/datetime.c b/numpy/core/src/multiarray/datetime.c index 182eb12f9..093090b4c 100644 --- a/numpy/core/src/multiarray/datetime.c +++ b/numpy/core/src/multiarray/datetime.c @@ -6,16 +6,13 @@ * * See LICENSE.txt for the license. */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#include <datetime.h> -#include <time.h> - -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE -#include <numpy/arrayobject.h> +#include "numpy/arrayobject.h" #include "npy_config.h" #include "npy_pycompat.h" @@ -30,7 +27,11 @@ #include "usertypes.h" #include "dtype_transfer.h" -#include <lowlevel_strided_loops.h> +#include "lowlevel_strided_loops.h" + +#include <datetime.h> +#include <time.h> + /* * Computes the python `ret, d = divmod(d, unit)`. diff --git a/numpy/core/src/multiarray/datetime_busday.c b/numpy/core/src/multiarray/datetime_busday.c index f0564146d..d3e9e1451 100644 --- a/numpy/core/src/multiarray/datetime_busday.c +++ b/numpy/core/src/multiarray/datetime_busday.c @@ -6,12 +6,12 @@ * * See LICENSE.txt for the license. */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include <numpy/arrayobject.h> #include "npy_config.h" diff --git a/numpy/core/src/multiarray/datetime_busdaycal.c b/numpy/core/src/multiarray/datetime_busdaycal.c index e3e729d3c..880efe934 100644 --- a/numpy/core/src/multiarray/datetime_busdaycal.c +++ b/numpy/core/src/multiarray/datetime_busdaycal.c @@ -7,19 +7,19 @@ * * See LICENSE.txt for the license. */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE -#include <numpy/arrayobject.h> +#include "numpy/arrayobject.h" +#include "numpy/arrayscalars.h" #include "npy_config.h" #include "npy_pycompat.h" #include "common.h" -#include "numpy/arrayscalars.h" #include "lowlevel_strided_loops.h" #include "_datetime.h" #include "datetime_busday.h" diff --git a/numpy/core/src/multiarray/datetime_strings.c b/numpy/core/src/multiarray/datetime_strings.c index 360868568..5080647cb 100644 --- a/numpy/core/src/multiarray/datetime_strings.c +++ b/numpy/core/src/multiarray/datetime_strings.c @@ -6,15 +6,14 @@ * * See LICENSE.txt for the license. */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#include <time.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE -#include <numpy/arrayobject.h> +#include "numpy/arrayobject.h" #include "npy_config.h" #include "npy_pycompat.h" @@ -24,6 +23,8 @@ #include "_datetime.h" #include "datetime_strings.h" +#include <time.h> + /* * Platform-specific time_t typedef. Some platforms use 32 bit, some use 64 bit * and we just use the default with the exception of mingw, where we must use diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c index 90453e38f..397768f19 100644 --- a/numpy/core/src/multiarray/descriptor.c +++ b/numpy/core/src/multiarray/descriptor.c @@ -1,11 +1,11 @@ /* Array Descr Object */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/dragon4.h b/numpy/core/src/multiarray/dragon4.h index 4b76bf9e5..d1b799f68 100644 --- a/numpy/core/src/multiarray/dragon4.h +++ b/numpy/core/src/multiarray/dragon4.h @@ -33,8 +33,8 @@ #ifndef _NPY_DRAGON4_H_ #define _NPY_DRAGON4_H_ -#include "Python.h" -#include "structmember.h" +#include <Python.h> +#include <structmember.h> #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE #include "numpy/arrayobject.h" diff --git a/numpy/core/src/multiarray/dtype_transfer.c b/numpy/core/src/multiarray/dtype_transfer.c index 50db627ea..8fb44c4f6 100644 --- a/numpy/core/src/multiarray/dtype_transfer.c +++ b/numpy/core/src/multiarray/dtype_transfer.c @@ -7,16 +7,16 @@ * The University of British Columbia * * See LICENSE.txt for the license. - + * */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN -#include "Python.h" -#include "structmember.h" +#include <Python.h> +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE -#include <numpy/arrayobject.h> +#include "numpy/arrayobject.h" #include "lowlevel_strided_loops.h" #include "npy_pycompat.h" diff --git a/numpy/core/src/multiarray/dtypemeta.c b/numpy/core/src/multiarray/dtypemeta.c index 597468c50..059ec201e 100644 --- a/numpy/core/src/multiarray/dtypemeta.c +++ b/numpy/core/src/multiarray/dtypemeta.c @@ -1,12 +1,11 @@ /* Array Descr Object */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" -#include "assert.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include <numpy/ndarraytypes.h> #include <numpy/arrayscalars.h> #include "npy_pycompat.h" @@ -19,6 +18,7 @@ #include "convert_datatype.h" #include "usertypes.h" +#include <assert.h> static void dtypemeta_dealloc(PyArray_DTypeMeta *self) { diff --git a/numpy/core/src/multiarray/einsum.c.src b/numpy/core/src/multiarray/einsum.c.src index 85806fab3..cd1a58982 100644 --- a/numpy/core/src/multiarray/einsum.c.src +++ b/numpy/core/src/multiarray/einsum.c.src @@ -9,8 +9,8 @@ */ #define PY_SSIZE_T_CLEAN -#include "Python.h" -#include "structmember.h" +#include <Python.h> +#include <structmember.h> #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE diff --git a/numpy/core/src/multiarray/flagsobject.c b/numpy/core/src/multiarray/flagsobject.c index fe73c18ee..3b1b4f406 100644 --- a/numpy/core/src/multiarray/flagsobject.c +++ b/numpy/core/src/multiarray/flagsobject.c @@ -1,11 +1,11 @@ /* Array Flags Object */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/getset.c b/numpy/core/src/multiarray/getset.c index de2a8c14e..2c8d1b3b4 100644 --- a/numpy/core/src/multiarray/getset.c +++ b/numpy/core/src/multiarray/getset.c @@ -1,11 +1,11 @@ /* Array Descr Object */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "npy_config.h" diff --git a/numpy/core/src/multiarray/hashdescr.c b/numpy/core/src/multiarray/hashdescr.c index e9a99cc8f..a3c9e986b 100644 --- a/numpy/core/src/multiarray/hashdescr.c +++ b/numpy/core/src/multiarray/hashdescr.c @@ -1,7 +1,9 @@ -#define PY_SSIZE_T_CLEAN -#include <Python.h> #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE + +#define PY_SSIZE_T_CLEAN +#include <Python.h> + #include <numpy/arrayobject.h> #include "npy_config.h" diff --git a/numpy/core/src/multiarray/item_selection.c b/numpy/core/src/multiarray/item_selection.c index 2b8ea9e79..ad5478bbf 100644 --- a/numpy/core/src/multiarray/item_selection.c +++ b/numpy/core/src/multiarray/item_selection.c @@ -1,10 +1,10 @@ -#define PY_SSIZE_T_CLEAN -#include <Python.h> -#include "structmember.h" - #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE +#define PY_SSIZE_T_CLEAN +#include <Python.h> +#include <structmember.h> + #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/iterators.c b/numpy/core/src/multiarray/iterators.c index f724837ce..36bfaa7cf 100644 --- a/numpy/core/src/multiarray/iterators.c +++ b/numpy/core/src/multiarray/iterators.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/legacy_dtype_implementation.c b/numpy/core/src/multiarray/legacy_dtype_implementation.c index 9b4946da3..72a52d7a8 100644 --- a/numpy/core/src/multiarray/legacy_dtype_implementation.c +++ b/numpy/core/src/multiarray/legacy_dtype_implementation.c @@ -6,9 +6,9 @@ * until such a time where legay user dtypes are deprecated and removed * entirely. */ - #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE + #include "numpy/arrayobject.h" #include "scalartypes.h" #include "_datetime.h" diff --git a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src index e38873746..b32664cc9 100644 --- a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src +++ b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src @@ -9,7 +9,7 @@ */ #define PY_SSIZE_T_CLEAN -#include "Python.h" +#include <Python.h> #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c index 41311b03f..014a863d5 100644 --- a/numpy/core/src/multiarray/mapping.c +++ b/numpy/core/src/multiarray/mapping.c @@ -1,10 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -/*#include <stdio.h>*/ -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "arrayobject.h" diff --git a/numpy/core/src/multiarray/methods.c b/numpy/core/src/multiarray/methods.c index dc23b3471..2c10817fa 100644 --- a/numpy/core/src/multiarray/methods.c +++ b/numpy/core/src/multiarray/methods.c @@ -1,14 +1,14 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN -#include <stdarg.h> #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" -#include "arrayobject.h" #include "numpy/arrayscalars.h" +#include "arrayobject.h" #include "arrayfunction_override.h" #include "npy_argparse.h" #include "npy_config.h" @@ -30,6 +30,8 @@ #include "methods.h" #include "alloc.h" +#include <stdarg.h> + /* NpyArg_ParseKeywords * diff --git a/numpy/core/src/multiarray/multiarraymodule.c b/numpy/core/src/multiarray/multiarraymodule.c index 232b29b5e..3b70424a5 100644 --- a/numpy/core/src/multiarray/multiarraymodule.c +++ b/numpy/core/src/multiarray/multiarraymodule.c @@ -11,16 +11,14 @@ oliphant@ee.byu.edu Brigham Young University */ - -/* $Id: multiarraymodule.c,v 1.36 2005/09/14 00:14:00 teoliphant Exp $ */ - -#define PY_SSIZE_T_CLEAN -#include "Python.h" -#include "structmember.h" - #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _UMATHMODULE #define _MULTIARRAYMODULE + +#define PY_SSIZE_T_CLEAN +#include <Python.h> +#include <structmember.h> + #include <numpy/npy_common.h> #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/nditer_api.c b/numpy/core/src/multiarray/nditer_api.c index a1ca5bff5..811eece7d 100644 --- a/numpy/core/src/multiarray/nditer_api.c +++ b/numpy/core/src/multiarray/nditer_api.c @@ -11,8 +11,9 @@ */ #define NPY_NO_DEPRECATED_API NPY_API_VERSION -/* Indicate that this .c file is allowed to include the header */ +/* Allow this .c file to include nditer_impl.h */ #define NPY_ITERATOR_IMPLEMENTATION_CODE + #include "nditer_impl.h" #include "templ_common.h" #include "ctors.h" diff --git a/numpy/core/src/multiarray/nditer_constr.c b/numpy/core/src/multiarray/nditer_constr.c index 98d4f5a75..57dbb3a94 100644 --- a/numpy/core/src/multiarray/nditer_constr.c +++ b/numpy/core/src/multiarray/nditer_constr.c @@ -11,10 +11,10 @@ */ #define NPY_NO_DEPRECATED_API NPY_API_VERSION -/* Indicate that this .c file is allowed to include the header */ +/* Allow this .c file to include nditer_impl.h */ #define NPY_ITERATOR_IMPLEMENTATION_CODE -#include "nditer_impl.h" +#include "nditer_impl.h" #include "arrayobject.h" #include "array_coercion.h" #include "templ_common.h" diff --git a/numpy/core/src/multiarray/nditer_impl.h b/numpy/core/src/multiarray/nditer_impl.h index a5a9177e5..6499e4895 100644 --- a/numpy/core/src/multiarray/nditer_impl.h +++ b/numpy/core/src/multiarray/nditer_impl.h @@ -11,8 +11,8 @@ #define _NPY_PRIVATE__NDITER_IMPL_H_ #define PY_SSIZE_T_CLEAN -#include "Python.h" -#include "structmember.h" +#include <Python.h> +#include <structmember.h> #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE diff --git a/numpy/core/src/multiarray/nditer_pywrap.c b/numpy/core/src/multiarray/nditer_pywrap.c index 8acc7f87f..8e072d5f4 100644 --- a/numpy/core/src/multiarray/nditer_pywrap.c +++ b/numpy/core/src/multiarray/nditer_pywrap.c @@ -6,13 +6,14 @@ * * See LICENSE.txt for the license. */ -#define PY_SSIZE_T_CLEAN -#include "Python.h" -#include "structmember.h" - #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE -#include <numpy/arrayobject.h> + +#define PY_SSIZE_T_CLEAN +#include <Python.h> +#include <structmember.h> + +#include "numpy/arrayobject.h" #include "npy_config.h" #include "npy_pycompat.h" #include "alloc.h" diff --git a/numpy/core/src/multiarray/number.c b/numpy/core/src/multiarray/number.c index 9ed7cde47..292ef55a6 100644 --- a/numpy/core/src/multiarray/number.c +++ b/numpy/core/src/multiarray/number.c @@ -1,10 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -/*#include <stdio.h>*/ -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "npy_config.h" diff --git a/numpy/core/src/multiarray/refcount.c b/numpy/core/src/multiarray/refcount.c index 41dd059b0..a1c310700 100644 --- a/numpy/core/src/multiarray/refcount.c +++ b/numpy/core/src/multiarray/refcount.c @@ -2,13 +2,13 @@ * This module corresponds to the `Special functions for NPY_OBJECT` * section in the numpy reference for C-API. */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" #include "iterators.h" diff --git a/numpy/core/src/multiarray/scalarapi.c b/numpy/core/src/multiarray/scalarapi.c index 0e93cbbe9..e409e9874 100644 --- a/numpy/core/src/multiarray/scalarapi.c +++ b/numpy/core/src/multiarray/scalarapi.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/scalartypes.c.src b/numpy/core/src/multiarray/scalartypes.c.src index 740ec8cc2..4faa647ec 100644 --- a/numpy/core/src/multiarray/scalartypes.c.src +++ b/numpy/core/src/multiarray/scalartypes.c.src @@ -1,7 +1,7 @@ /* -*- c -*- */ #define PY_SSIZE_T_CLEAN -#include "Python.h" -#include "structmember.h" +#include <Python.h> +#include <structmember.h> #define NPY_NO_DEPRECATED_API NPY_API_VERSION #ifndef _MULTIARRAYMODULE diff --git a/numpy/core/src/multiarray/sequence.c b/numpy/core/src/multiarray/sequence.c index 1c74f1719..8db0690a1 100644 --- a/numpy/core/src/multiarray/sequence.c +++ b/numpy/core/src/multiarray/sequence.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/shape.c b/numpy/core/src/multiarray/shape.c index 02c349759..5a4e8c0f3 100644 --- a/numpy/core/src/multiarray/shape.c +++ b/numpy/core/src/multiarray/shape.c @@ -1,9 +1,10 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/strfuncs.c b/numpy/core/src/multiarray/strfuncs.c index d9d9b7c0a..ba457f4f4 100644 --- a/numpy/core/src/multiarray/strfuncs.c +++ b/numpy/core/src/multiarray/strfuncs.c @@ -1,8 +1,10 @@ #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE +#define PY_SSIZE_T_CLEAN #include <Python.h> -#include <numpy/arrayobject.h> + +#include "numpy/arrayobject.h" #include "npy_pycompat.h" #include "npy_import.h" #include "strfuncs.h" diff --git a/numpy/core/src/multiarray/temp_elide.c b/numpy/core/src/multiarray/temp_elide.c index 2b4621744..f615aa336 100644 --- a/numpy/core/src/multiarray/temp_elide.c +++ b/numpy/core/src/multiarray/temp_elide.c @@ -1,8 +1,9 @@ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "npy_config.h" #include "numpy/arrayobject.h" diff --git a/numpy/core/src/multiarray/typeinfo.c b/numpy/core/src/multiarray/typeinfo.c index b0563b3c0..8cf6bc1e0 100644 --- a/numpy/core/src/multiarray/typeinfo.c +++ b/numpy/core/src/multiarray/typeinfo.c @@ -3,6 +3,10 @@ * Unfortunately, we need two different types to cover the cases where min/max * do and do not appear in the tuple. */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + +#include "npy_pycompat.h" #include "typeinfo.h" #if (defined(PYPY_VERSION_NUM) && (PYPY_VERSION_NUM <= 0x07030000)) @@ -10,9 +14,6 @@ #include <structseq.h> #endif -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE -#include "npy_pycompat.h" static PyTypeObject PyArray_typeinfoType; diff --git a/numpy/core/src/multiarray/usertypes.c b/numpy/core/src/multiarray/usertypes.c index 5602304e9..d0cf53576 100644 --- a/numpy/core/src/multiarray/usertypes.c +++ b/numpy/core/src/multiarray/usertypes.c @@ -20,13 +20,13 @@ maintainer email: oliphant.travis@ieee.org Space Science Telescope Institute (J. Todd Miller, Perry Greenfield, Rick White) */ +#define NPY_NO_DEPRECATED_API NPY_API_VERSION +#define _MULTIARRAYMODULE + #define PY_SSIZE_T_CLEAN #include <Python.h> -#include "structmember.h" +#include <structmember.h> -/*#include <stdio.h>*/ -#define NPY_NO_DEPRECATED_API NPY_API_VERSION -#define _MULTIARRAYMODULE #include "numpy/arrayobject.h" #include "numpy/arrayscalars.h" diff --git a/numpy/core/src/multiarray/vdot.c b/numpy/core/src/multiarray/vdot.c index 9b5d19522..ff08ed2d4 100644 --- a/numpy/core/src/multiarray/vdot.c +++ b/numpy/core/src/multiarray/vdot.c @@ -1,7 +1,9 @@ #define NPY_NO_DEPRECATED_API NPY_API_VERSION #define _MULTIARRAYMODULE +#define PY_SSIZE_T_CLEAN #include <Python.h> + #include "common.h" #include "vdot.h" #include "npy_cblas.h" |