diff options
author | Mark Wiebe <mwwiebe@gmail.com> | 2011-01-28 17:28:26 -0800 |
---|---|---|
committer | Mark Wiebe <mwwiebe@gmail.com> | 2011-01-28 17:28:26 -0800 |
commit | 7bead6a6b5a108f2515f8a81c95eb2a42eee6240 (patch) | |
tree | a2b46011bd8fbaf94f189e400b2bddfb6e064b9c | |
parent | ab3dcf817066e7be08e0c4c6264db36674978284 (diff) | |
download | numpy-7bead6a6b5a108f2515f8a81c95eb2a42eee6240.tar.gz |
STY: Rename NPY_ITER_DONT_REVERSE_AXES to NPY_ITER_DONT_NEGATE_STRIDES to be more intuitive
-rw-r--r-- | doc/neps/new-iterator-ufunc.rst | 4 | ||||
-rw-r--r-- | numpy/core/include/numpy/ndarraytypes.h | 2 | ||||
-rw-r--r-- | numpy/core/src/multiarray/ctors.c | 4 | ||||
-rw-r--r-- | numpy/core/src/multiarray/new_iterator.c.src | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/doc/neps/new-iterator-ufunc.rst b/doc/neps/new-iterator-ufunc.rst index 52a44413d..76b21d644 100644 --- a/doc/neps/new-iterator-ufunc.rst +++ b/doc/neps/new-iterator-ufunc.rst @@ -736,7 +736,7 @@ Construction and Destruction orders enforce the particular iteration pattern. When using ``NPY_KEEPORDER``, if you also want to ensure that the iteration is not reversed along an axis, you should pass the flag - ``NPY_ITER_DONT_REVERSE_AXES``. + ``NPY_ITER_DONT_NEGATE_STRIDES``. Any of the ``NPY_CASTING`` enum values may be passed to ``casting``. The values include ``NPY_NO_CASTING``, ``NPY_EQUIV_CASTING``, @@ -796,7 +796,7 @@ Construction and Destruction This flag is incompatible with ``NPY_ITER_C_INDEX``, ``NPY_ITER_F_INDEX``, and ``NPY_ITER_COORDS``. - ``NPY_ITER_DONT_REVERSE_AXES`` + ``NPY_ITER_DONT_NEGATE_STRIDES`` This only affects the iterator when NPY_KEEPORDER is specified for the order parameter. By default with NPY_KEEPORDER, the diff --git a/numpy/core/include/numpy/ndarraytypes.h b/numpy/core/include/numpy/ndarraytypes.h index 4ca1b2cae..0fa146d79 100644 --- a/numpy/core/include/numpy/ndarraytypes.h +++ b/numpy/core/include/numpy/ndarraytypes.h @@ -898,7 +898,7 @@ typedef void (*NpyIter_GetCoords_Fn )(NpyIter *iter, /* Delay allocation of buffers until first Reset* call */ #define NPY_ITER_DELAY_BUFALLOC 0x00000800 /* When NPY_KEEPORDER is specified, disable reversing negative-stride axes */ -#define NPY_ITER_DONT_REVERSE_AXES 0x00001000 +#define NPY_ITER_DONT_NEGATE_STRIDES 0x00001000 /*** Per-operand flags that may be passed to the iterator constructors ***/ diff --git a/numpy/core/src/multiarray/ctors.c b/numpy/core/src/multiarray/ctors.c index 5f1f7aa25..a3f016722 100644 --- a/numpy/core/src/multiarray/ctors.c +++ b/numpy/core/src/multiarray/ctors.c @@ -2289,7 +2289,7 @@ PyArray_CopyAnyIntoOrdered(PyArrayObject *dst, PyArrayObject *src, */ dst_iter = NpyIter_New(dst, NPY_ITER_WRITEONLY| NPY_ITER_NO_INNER_ITERATION| - NPY_ITER_DONT_REVERSE_AXES| + NPY_ITER_DONT_NEGATE_STRIDES| NPY_ITER_REFS_OK, order, NPY_NO_CASTING, @@ -2299,7 +2299,7 @@ PyArray_CopyAnyIntoOrdered(PyArrayObject *dst, PyArrayObject *src, } src_iter = NpyIter_New(src, NPY_ITER_READONLY| NPY_ITER_NO_INNER_ITERATION| - NPY_ITER_DONT_REVERSE_AXES| + NPY_ITER_DONT_NEGATE_STRIDES| NPY_ITER_REFS_OK, order, NPY_NO_CASTING, diff --git a/numpy/core/src/multiarray/new_iterator.c.src b/numpy/core/src/multiarray/new_iterator.c.src index 89de0821b..e7d9db2dd 100644 --- a/numpy/core/src/multiarray/new_iterator.c.src +++ b/numpy/core/src/multiarray/new_iterator.c.src @@ -508,7 +508,7 @@ NpyIter_MultiNew(npy_intp niter, PyArrayObject **op_in, npy_uint32 flags, * If there's an output being allocated, we must not negate * any strides. */ - if (!any_allocate && !(flags&NPY_ITER_DONT_REVERSE_AXES)) { + if (!any_allocate && !(flags&NPY_ITER_DONT_NEGATE_STRIDES)) { npyiter_flip_negative_strides(iter); } itflags = NIT_ITFLAGS(iter); |