jax.experimental.sparse.empty

Contents

jax.experimental.sparse.empty#

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

Create an empty sparse array.

Parameters:
  • shape (Shape) – sequence of integers giving the array shape.

  • dtype (DTypeLike | None) – (optional) dtype of the array.

  • index_dtype (DTypeLike) – (optional) dtype of the index arrays.

  • format – string specifying the matrix format (e.g. [‘bcoo’]).

  • **kwds – additional keywords passed to the format-specific _empty constructor.

  • sparse_format (str) –

Returns:

empty sparse matrix.

Return type:

mat