From e521b16844efc2853c0db9014098cb3e37f6eb04 Mon Sep 17 00:00:00 2001 From: Aaron Meurer Date: Tue, 12 Jan 2021 12:57:45 -0700 Subject: Add missing returns to the array API sorting functions --- numpy/_array_api/_sorting_functions.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'numpy/_array_api') diff --git a/numpy/_array_api/_sorting_functions.py b/numpy/_array_api/_sorting_functions.py index 98db3c7a2..fb2f819a2 100644 --- a/numpy/_array_api/_sorting_functions.py +++ b/numpy/_array_api/_sorting_functions.py @@ -6,6 +6,7 @@ def argsort(x, /, *, axis=-1, descending=False, stable=True): res = argsort(x, axis=axis, kind=kind) if descending: res = flip(res, axis=axis) + return res def sort(x, /, *, axis=-1, descending=False, stable=True): from .. import sort @@ -15,3 +16,4 @@ def sort(x, /, *, axis=-1, descending=False, stable=True): res = sort(x, axis=axis, kind=kind) if descending: res = flip(res, axis=axis) + return res -- cgit v1.2.1