diff options
author | gfyoung <gfyoung17@gmail.com> | 2016-02-18 10:03:30 +0000 |
---|---|---|
committer | gfyoung <gfyoung17@gmail.com> | 2016-02-19 18:37:12 +0000 |
commit | ed527cd7b28a76c8ecb2bd0e32a74a03767916bb (patch) | |
tree | 8342b011f1c7cd26286975ab8e51a1d8b6ad0c2a /numpy/lib/function_base.py | |
parent | bd905a8f0100a9cda21b1933676ef36ad213e879 (diff) | |
download | numpy-ed527cd7b28a76c8ecb2bd0e32a74a03767916bb.tar.gz |
BUG: Preserve array order in np.delete
Closes gh-7113.
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 66213c5e0..7f80e424c 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -4097,7 +4097,7 @@ def delete(arr, obj, axis=None): if wrap: return wrap(arr) else: - return arr.copy() + return arr.copy(order=arrorder) slobj = [slice(None)]*ndim N = arr.shape[axis] @@ -4110,9 +4110,9 @@ def delete(arr, obj, axis=None): if numtodel <= 0: if wrap: - return wrap(arr.copy()) + return wrap(arr.copy(order=arrorder)) else: - return arr.copy() + return arr.copy(order=arrorder) # Invert if step is negative: if step < 0: @@ -4333,7 +4333,7 @@ def insert(arr, obj, values, axis=None): warnings.warn( "in the future the special handling of scalars will be removed " "from insert and raise an error", DeprecationWarning) - arr = arr.copy() + arr = arr.copy(order=arrorder) arr[...] = values if wrap: return wrap(arr) |