diff options
author | Travis Oliphant <oliphant@enthought.com> | 2005-12-30 22:52:11 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2005-12-30 22:52:11 +0000 |
commit | e9dead211ce95d36d1af8844403345b71d0b698d (patch) | |
tree | 5afd9a616ec554abd29f90253fb6a213049fe256 /scipy/base/function_base.py | |
parent | a2eaf4b1f11187099a911a322fb5a54052d5fe97 (diff) | |
download | numpy-e9dead211ce95d36d1af8844403345b71d0b698d.tar.gz |
Fixed some other uses of sort method.
Diffstat (limited to 'scipy/base/function_base.py')
-rw-r--r-- | scipy/base/function_base.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scipy/base/function_base.py b/scipy/base/function_base.py index 2ebf3f90d..60e4b4be0 100644 --- a/scipy/base/function_base.py +++ b/scipy/base/function_base.py @@ -463,7 +463,8 @@ def sort_complex(a): for complex arrays). This function is a wrapper ensuring a complex return type. """ - b = asarray(a).sort() + b = array(a,copy=True) + b.sort() if not issubclass(b.dtype, _nx.complexfloating): if b.dtypechar in 'bhBH': return b.astype('F') @@ -782,7 +783,9 @@ def sinc(x): return sin(y)/y def msort(a): - return a.sort(0) + b = array(a,copy=True) + b.sort(0) + return b def median(m): """median(m) returns a median of m along the first dimension of m. |