topk_diagreplace#

hypercoil.functional.sparse.topk_diagreplace(input: BCOO, diag: Tensor) BCOO[source]#

Diagonal replacement of a top-k sparse matrix.