diff options
| author | Eric Wieser <wieser.eric@gmail.com> | 2019-03-20 23:58:04 -0700 |
|---|---|---|
| committer | Eric Wieser <wieser.eric@gmail.com> | 2019-03-20 23:58:04 -0700 |
| commit | e0dc67203e38e3e32e8bc89cbd202fa12884ffd3 (patch) | |
| tree | f439f38a973ca9afc121c009a95e243dfd08d847 /numpy/core/src/multiarray | |
| parent | 251c526672f897543176b966229ecde96bb89a9d (diff) | |
| download | numpy-e0dc67203e38e3e32e8bc89cbd202fa12884ffd3.tar.gz | |
STY: Fix weird indents to be multiples of 4 spaces
Diffstat (limited to 'numpy/core/src/multiarray')
| -rw-r--r-- | numpy/core/src/multiarray/array_assign_array.c | 16 | ||||
| -rw-r--r-- | numpy/core/src/multiarray/compiled_base.c | 2 | ||||
| -rw-r--r-- | numpy/core/src/multiarray/dtype_transfer.c | 4 | ||||
| -rw-r--r-- | numpy/core/src/multiarray/flagsobject.c | 2 | ||||
| -rw-r--r-- | numpy/core/src/multiarray/hashdescr.c | 22 | ||||
| -rw-r--r-- | numpy/core/src/multiarray/item_selection.c | 2 | ||||
| -rw-r--r-- | numpy/core/src/multiarray/mapping.c | 40 | ||||
| -rw-r--r-- | numpy/core/src/multiarray/nditer_constr.c | 4 |
8 files changed, 46 insertions, 46 deletions
diff --git a/numpy/core/src/multiarray/array_assign_array.c b/numpy/core/src/multiarray/array_assign_array.c index 6e31fd3f7..7ff33ebd7 100644 --- a/numpy/core/src/multiarray/array_assign_array.c +++ b/numpy/core/src/multiarray/array_assign_array.c @@ -420,14 +420,14 @@ PyArray_AssignArray(PyArrayObject *dst, PyArrayObject *src, /* A straightforward where-masked assignment */ /* Do the masked assignment with raw array iteration */ - if (raw_array_wheremasked_assign_array( - PyArray_NDIM(dst), PyArray_DIMS(dst), - PyArray_DESCR(dst), PyArray_DATA(dst), PyArray_STRIDES(dst), - PyArray_DESCR(src), PyArray_DATA(src), src_strides, - PyArray_DESCR(wheremask), PyArray_DATA(wheremask), - wheremask_strides) < 0) { - goto fail; - } + if (raw_array_wheremasked_assign_array( + PyArray_NDIM(dst), PyArray_DIMS(dst), + PyArray_DESCR(dst), PyArray_DATA(dst), PyArray_STRIDES(dst), + PyArray_DESCR(src), PyArray_DATA(src), src_strides, + PyArray_DESCR(wheremask), PyArray_DATA(wheremask), + wheremask_strides) < 0) { + goto fail; + } } if (copied_src) { diff --git a/numpy/core/src/multiarray/compiled_base.c b/numpy/core/src/multiarray/compiled_base.c index 2da274658..1e0c1eb5f 100644 --- a/numpy/core/src/multiarray/compiled_base.c +++ b/numpy/core/src/multiarray/compiled_base.c @@ -1198,7 +1198,7 @@ arr_unravel_index(PyObject *self, PyObject *args, PyObject *kwds) * if "dims" is detected in keywords, then replace it with * the new "shape" argument and continue processing as usual. */ - if (kwds) { + if (kwds) { PyObject *dims_item, *shape_item; dims_item = PyDict_GetItemString(kwds, "dims"); shape_item = PyDict_GetItemString(kwds, "shape"); diff --git a/numpy/core/src/multiarray/dtype_transfer.c b/numpy/core/src/multiarray/dtype_transfer.c index 3ab07ad31..a90416a40 100644 --- a/numpy/core/src/multiarray/dtype_transfer.c +++ b/numpy/core/src/multiarray/dtype_transfer.c @@ -2375,7 +2375,7 @@ get_subarray_transfer_function(int aligned, /* Get the subarray shapes and sizes */ if (PyDataType_HASSUBARRAY(src_dtype)) { - if (!(PyArray_IntpConverter(src_dtype->subarray->shape, + if (!(PyArray_IntpConverter(src_dtype->subarray->shape, &src_shape))) { PyErr_SetString(PyExc_ValueError, "invalid subarray shape"); @@ -2385,7 +2385,7 @@ get_subarray_transfer_function(int aligned, src_dtype = src_dtype->subarray->base; } if (PyDataType_HASSUBARRAY(dst_dtype)) { - if (!(PyArray_IntpConverter(dst_dtype->subarray->shape, + if (!(PyArray_IntpConverter(dst_dtype->subarray->shape, &dst_shape))) { npy_free_cache_dim_obj(src_shape); PyErr_SetString(PyExc_ValueError, diff --git a/numpy/core/src/multiarray/flagsobject.c b/numpy/core/src/multiarray/flagsobject.c index 85ea49fb4..e378f1133 100644 --- a/numpy/core/src/multiarray/flagsobject.c +++ b/numpy/core/src/multiarray/flagsobject.c @@ -147,7 +147,7 @@ _UpdateContiguousFlags(PyArrayObject *ap) if (PyArray_STRIDES(ap)[i] != sd) { is_c_contig = 0; break; - } + } /* contiguous, if it got this far */ if (dim == 0) { break; diff --git a/numpy/core/src/multiarray/hashdescr.c b/numpy/core/src/multiarray/hashdescr.c index 8465093b9..0b23b6c21 100644 --- a/numpy/core/src/multiarray/hashdescr.c +++ b/numpy/core/src/multiarray/hashdescr.c @@ -36,17 +36,17 @@ static int _array_descr_builtin(PyArray_Descr* descr, PyObject *l); */ static char _normalize_byteorder(char byteorder) { - switch(byteorder) { - case '=': - if (PyArray_GetEndianness() == NPY_CPU_BIG) { - return '>'; - } - else { - return '<'; - } - default: - return byteorder; - } + switch(byteorder) { + case '=': + if (PyArray_GetEndianness() == NPY_CPU_BIG) { + return '>'; + } + else { + return '<'; + } + default: + return byteorder; + } } /* diff --git a/numpy/core/src/multiarray/item_selection.c b/numpy/core/src/multiarray/item_selection.c index 4888224f3..5a40803db 100644 --- a/numpy/core/src/multiarray/item_selection.c +++ b/numpy/core/src/multiarray/item_selection.c @@ -2392,7 +2392,7 @@ PyArray_MultiIndexGetItem(PyArrayObject *self, npy_intp *multi_index) npy_intp ind = multi_index[idim]; if (check_and_adjust_index(&ind, shapevalue, idim, NULL) < 0) { - return NULL; + return NULL; } data += ind * strides[idim]; } diff --git a/numpy/core/src/multiarray/mapping.c b/numpy/core/src/multiarray/mapping.c index 17edd2bbf..10206c03e 100644 --- a/numpy/core/src/multiarray/mapping.c +++ b/numpy/core/src/multiarray/mapping.c @@ -710,26 +710,26 @@ prepare_index(PyArrayObject *self, PyObject *index, * to find the ellipsis value or append an ellipsis if necessary. */ if (used_ndim < PyArray_NDIM(self)) { - if (index_type & HAS_ELLIPSIS) { - indices[ellipsis_pos].value = PyArray_NDIM(self) - used_ndim; - used_ndim = PyArray_NDIM(self); - new_ndim += indices[ellipsis_pos].value; - } - else { - /* - * There is no ellipsis yet, but it is not a full index - * so we append an ellipsis to the end. - */ - index_type |= HAS_ELLIPSIS; - indices[curr_idx].object = NULL; - indices[curr_idx].type = HAS_ELLIPSIS; - indices[curr_idx].value = PyArray_NDIM(self) - used_ndim; - ellipsis_pos = curr_idx; - - used_ndim = PyArray_NDIM(self); - new_ndim += indices[curr_idx].value; - curr_idx += 1; - } + if (index_type & HAS_ELLIPSIS) { + indices[ellipsis_pos].value = PyArray_NDIM(self) - used_ndim; + used_ndim = PyArray_NDIM(self); + new_ndim += indices[ellipsis_pos].value; + } + else { + /* + * There is no ellipsis yet, but it is not a full index + * so we append an ellipsis to the end. + */ + index_type |= HAS_ELLIPSIS; + indices[curr_idx].object = NULL; + indices[curr_idx].type = HAS_ELLIPSIS; + indices[curr_idx].value = PyArray_NDIM(self) - used_ndim; + ellipsis_pos = curr_idx; + + used_ndim = PyArray_NDIM(self); + new_ndim += indices[curr_idx].value; + curr_idx += 1; + } } else if (used_ndim > PyArray_NDIM(self)) { PyErr_SetString(PyExc_IndexError, diff --git a/numpy/core/src/multiarray/nditer_constr.c b/numpy/core/src/multiarray/nditer_constr.c index dc58b3a78..3b3635afe 100644 --- a/numpy/core/src/multiarray/nditer_constr.c +++ b/numpy/core/src/multiarray/nditer_constr.c @@ -2120,8 +2120,8 @@ npyiter_apply_forced_iteration_order(NpyIter *iter, NPY_ORDER order) /* Check that all the array inputs are fortran order */ for (iop = 0; iop < nop; ++iop, ++op) { if (*op && !PyArray_CHKFLAGS(*op, NPY_ARRAY_F_CONTIGUOUS)) { - forder = 0; - break; + forder = 0; + break; } } |
