diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/ma/core.py | 3 | ||||
-rw-r--r-- | numpy/ma/tests/test_core.py | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index de8512831..bb013ef5e 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -4743,8 +4743,7 @@ class MaskedArray(ndarray): round.__doc__ = ndarray.round.__doc__ #............................................ - def argsort(self, axis=None, fill_value=None, kind='quicksort', - order=None): + def argsort(self, axis=None, kind='quicksort', order=None, fill_value=None): """ Return an ndarray of indices that sort the array along the specified axis. Masked values are filled beforehand to diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py index 700f99ba2..eb01e23cc 100644 --- a/numpy/ma/tests/test_core.py +++ b/numpy/ma/tests/test_core.py @@ -2270,7 +2270,11 @@ class TestMaskedArrayMethods(TestCase): dtype=[('A', int), ('B', int)]) assert_equal(test, b) assert_equal(test.mask, b.mask) - # + + def test_argsort(self): + "Test argsort" + a = array([1, 5, 2, 4, 3], mask=[1, 0, 0, 1, 0]) + assert_equal(np.argsort(a), argsort(a)) def test_squeeze(self): |