diff --git a/imperative/python/megengine/functional/math.py b/imperative/python/megengine/functional/math.py index 4ae82c1e156d5fd060cc1f192a2c47fc11c5d3e6..fe20d8fbf9628a4bf2fff140048e3860827a08bc 100644 --- a/imperative/python/megengine/functional/math.py +++ b/imperative/python/megengine/functional/math.py @@ -631,11 +631,10 @@ def sort(inp: Tensor, descending: bool = False) -> Tuple[Tensor, Tensor]: return tns, ind -@deprecated_kwargs_default("1.12", "descending", 3) def topk( inp: Tensor, k: int, - descending: bool = False, + descending: bool = True, kth_only: bool = False, no_sort: bool = False, ) -> Tuple[Tensor, Tensor]: @@ -644,7 +643,7 @@ def topk( Args: inp: input tensor. If input tensor is 2d, each row will be sorted. k: number of elements needed. - descending: if True, return the largest elements instead. Default: False + descending: if True, return the largest elements. Default: True kth_only: if True, only the k-th element will be returned. Default: False no_sort: if True, the returned elements can be unordered. Default: False