spsp_innerpaired#

hypercoil.functional.sparse.spsp_innerpaired(lhs: BCOO, rhs: BCOO | None = None) Tensor[source]#

Positive definite nondegenerate symmetric bilinear forms with sparse arguments.

Note

The array dimension signature of this operation is informally

\(\mathbb{R}^{m \times p} \times \mathbb{R}^{m \times p} \rightarrow \mathbb{R}^{m}\)

while that of spspmm is

\(\mathbb{R}^{m \times p} \times \mathbb{R}^{n \times p} \rightarrow \mathbb{R}^{m \times n}\)

Every argument in lhs is thus paired with one in rhs. If your data do not fit this schema, then use spspmm instead.

Note

If rhs is not specified, then this computes a squared vector norm.