Describe the bug
There is no link to the documentation page for the function sparse that coerces an array or Matrix into a SparseMatrix; and nowhere is it documented that unlike DenseMatrix, a SparseMatrix may only contain numerical entries (e.g., a DenseMatrix [['fred', 0, null]] can perfectly well be created, but there is no SparseMatrix with these entries).
To Reproduce
While you can directly go to https://mathjs.org/docs/reference/functions/sparse.html if you guess that it exists, I have been unable to find any link to this page; nor do any of the web pages which mention SparseMatrix (e.g., the general Matrices page or the specific SparseMatrix page, nor the sparse() documentation) appear to mention that such a matrix can only contain numeric entries. (The sticking point appears to be that for each entry a, equalScalar(0, a) must return true or false, but it throws an error when a is not numeric.)
The missing documentation link may be a duplicate of #3368.
Describe the bug
There is no link to the documentation page for the function
sparsethat coerces an array or Matrix into a SparseMatrix; and nowhere is it documented that unlike DenseMatrix, a SparseMatrix may only contain numerical entries (e.g., a DenseMatrix[['fred', 0, null]]can perfectly well be created, but there is no SparseMatrix with these entries).To Reproduce
While you can directly go to https://mathjs.org/docs/reference/functions/sparse.html if you guess that it exists, I have been unable to find any link to this page; nor do any of the web pages which mention SparseMatrix (e.g., the general Matrices page or the specific SparseMatrix page, nor the
sparse()documentation) appear to mention that such a matrix can only contain numeric entries. (The sticking point appears to be that for each entrya,equalScalar(0, a)must return true or false, but it throws an error whenais not numeric.)The missing documentation link may be a duplicate of #3368.