jax.experimental.sparse.empty#

jax.experimental.sparse.empty(shape, dtype=None, index_dtype='int32', sparse_format='bcoo', **kwds)[源代码]#

创建一个空的稀疏数组。

参数:
  • shape (Shape) – 表示数组形状的整数序列。

  • dtype (DTypeLike | None | None) – (可选) 数组的数据类型。

  • index_dtype (DTypeLike) – (可选) 索引数组的数据类型。

  • format – 指定矩阵格式的字符串 (例如 [‘bcoo’])。

  • **kwds – 传递给特定格式的 _empty 构造函数的其他关键字。

  • sparse_format (str)

返回:

空的稀疏矩阵。

返回类型:

mat