as_topk#

hypercoil.functional.sparse.as_topk(tensor: Tensor, k: int, *, descending: bool = True) BCOO[source]#

Convert a tensor to a top-k sparse matrix format.