Skip to content

Commit f1babd5

Browse files
committed
Update signatures
1 parent 724bcc0 commit f1babd5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

signatures/searching/top_k.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ jax.numpy.argpartition(a, kth, axis=-1) → ndarray
6565
## MXNet
6666

6767
```
68-
npx.topk(data, axis=-1, k=1, ret_typ='indices', is_ascend=False, dtype='float32') → ndarray | [ndarray, ndarray]
68+
npx.topk(data, axis=-1, k=1, ret_typ='indices', is_ascend=False, dtype='float32') → ndarray | tuple[ndarray, ndarray]
6969
```
7070

7171
**Note**: whether a single ndarray or a list of ndarrays is returned is determined by `ret_type`. Differs from NumPy et al in providing a default value for `k`.
7272

7373
## PyTorch
7474

7575
```
76-
torch.topk(input, k, dim=None, largest=True, sorted=True, *, out=None) → (Tensor, LongTensor)
76+
torch.topk(input, k, dim=None, largest=True, sorted=True, *, out=None) → tuple[Tensor, LongTensor]
7777
```
7878

7979
**Note**: returns a named tuple containing values and indices. Differs from NumPy et al for default `dim`.
@@ -82,7 +82,7 @@ torch.topk(input, k, dim=None, largest=True, sorted=True, *, out=None) → (Tens
8282

8383
```
8484
tf.math.top_k(input, k=1, sorted=True, index_type=tf.dtypes.int32, name=None
85-
) → (Tensor, Tensor)
85+
) → tuple[Tensor, Tensor]
8686
```
8787

8888
**Note**: returns a `(values, indices)` tuple. Only supports last axis.

0 commit comments

Comments
 (0)