mul#

iskra.sparse.mul(a: SparseTensor, b: SparseTensor) SparseTensor[SOURCE]#
iskra.sparse.mul(a: Tensor, b: SparseTensor) SparseTensor
iskra.sparse.mul(a: SparseTensor, b: Tensor) SparseTensor
iskra.sparse.mul(a: Tensor, b: Tensor) Tensor

Elementwise product of two tensors with support for sparse COO tensors.

Parameters:
Raises:

ValueError – If both tensors are sparse, they must have the same shape.

Returns:

(SparseTensor | Tensor) – Elementwise product of the two tensors.