tensordot
- sparse.tensordot(a, b, axes=2, *, return_type=None)[source]
Perform the equivalent of
numpy.tensordot
.- Parameters:
a (Union[SparseArray, np.ndarray, scipy.sparse.spmatrix]) – The arrays to perform the
tensordot
operation on.b (Union[SparseArray, np.ndarray, scipy.sparse.spmatrix]) – The arrays to perform the
tensordot
operation on.axes (tuple[Union[int, tuple[int], Union[int, tuple[int]], optional) – The axes to match when performing the sum.
return_type ({None, COO, np.ndarray}, optional) – Type of returned array.
- Returns:
The result of the operation.
- Return type:
Union[SparseArray, numpy.ndarray]
- Raises:
ValueError – If all arguments don’t have zero fill-values.
See also
numpy.tensordot
NumPy equivalent function