range() returning dense matrix? #2652
-
Should return an array, but instead it returns a matrix? That's very strange behaviour; Am I missing something? The docs say it can return an array or a matrix. I assumed that if I gave it matrix inputs (to make a mesh for instance), I'd get a matrix output; But instead with simple number inputs we get a matrix instead. https://mathjs.org/docs/reference/functions/range.html This gives the expected result:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can configure whether the function returns a Matrix or an Array using the configuration option |
Beta Was this translation helpful? Give feedback.
You can configure whether the function returns a Matrix or an Array using the configuration option
matrix: 'Array'
, see docs https://mathjs.org/docs/core/configuration.html