tabmat icon indicating copy to clipboard operation
tabmat copied to clipboard

Should we return MatrixBase more often?

Open MarcAntoineSchmidtQC opened this issue 3 years ago • 1 comments

There are operations currently that return non-MatrixBase results. Is there a good reason to do this if the result does not become a scalar?

For instance, CategoricalMatrix * DenseMatrix -> scipy.sparse.csr_matrix instead of a SparseMatrix. Another one is indexing on SparseMatrix, which return a np.matrix type.

MarcAntoineSchmidtQC avatar Aug 03 '21 19:08 MarcAntoineSchmidtQC

For the most part, I think we should treat these as bugs unless there's something that I'm missing.

But, I guess I have a general concern about the scale of the task set forth by quantcore.matrix. Is this only the tip of the iceberg in terms of objects that need to be converted back to MatrixBase objects? Or are there just a few operations to fix and we'll be done? Any guesses here?

tbenthompson avatar Aug 04 '21 02:08 tbenthompson

Addressed by #286.