jax.experimental.sparse.coo_fromdense# jax.experimental.sparse.coo_fromdense(mat, *, nse=None, index_dtype=<class 'jax.numpy.int32'>)[原始碼]# 從密集矩陣建立 COO 格式的稀疏矩陣。 參數: mat (Array) – 要轉換為 COO 的陣列。 nse (int | None | None) – mat 中指定的條目數。如果未指定,將從輸入矩陣計算。 index_dtype (DTypeLike) – 稀疏索引的 dtype 返回: 矩陣的 COO 表示法。 返回類型: mat_coo