jax.experimental.sparse.csr_matvec

Contents

jax.experimental.sparse.csr_matvec#

jax.experimental.sparse.csr_matvec(mat, v, transpose=False)[source]#

Product of CSR sparse matrix and a dense vector.

Parameters:
  • mat (CSR) – CSR matrix

  • v (Array) – one-dimensional array of size (shape[0] if transpose else shape[1],) and dtype mat.dtype

  • transpose (bool) – boolean specifying whether to transpose the sparse matrix before computing.

Returns:

array of shape (mat.shape[1] if transpose else mat.shape[0],) representing

the matrix vector product.

Return type:

y