Description
As mentioned in #1854, PyTensor's dot product for sparse matrices always returns a dense array, even when both inputs are sparse. This behavior differs from SciPy's, which returns a sparse matrix when both inputs are sparse (using the format of the first input IIRC).
Note this only happens with pytensor.sparse.dot. The other operator, pytensor.sparse.structured_dot, does return a sparse matrix when both inputs are sparse.
I have not looked into pytensor.sparse.true_dot yet, but a skim suggests this one always return a sparse matrix.