summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2013-10-23 21:26:47 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2013-10-23 21:26:47 +0200
commitf0e6e0143c4a43e0bb9dcad7c567ffaa51d7a281 (patch)
treeba27ec5a2ade314bb183b256b2cba96bd986673a /numpy/core/fromnumeric.py
parentec5b97ddb592de1e5722439c3ba0599e62e73fed (diff)
downloadnumpy-f0e6e0143c4a43e0bb9dcad7c567ffaa51d7a281.tar.gz
ENH: keep order in np.sort and np.partition copy
avoids unnecessary strided to contig copy for fortran arrays.
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index abfa99e80..152cceb1b 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -615,7 +615,7 @@ def partition(a, kth, axis=-1, kind='introselect', order=None):
a = asanyarray(a).flatten()
axis = 0
else:
- a = asanyarray(a).copy()
+ a = asanyarray(a).copy(order="K")
a.partition(kth, axis=axis, kind=kind, order=order)
return a
@@ -784,7 +784,7 @@ def sort(a, axis=-1, kind='quicksort', order=None):
a = asanyarray(a).flatten()
axis = 0
else:
- a = asanyarray(a).copy()
+ a = asanyarray(a).copy(order="K")
a.sort(axis, kind, order)
return a