matrix
matrix copied to clipboard
Maybe expose more?
Hi,
Would it make sense to expose more functionality than merely 'matrix'?
I'd like to have an identity function be available for example; the export could look like this:
module.exports = matrix;
module.exports.identity = (d => matrix(identity(d)));
@jakobdalsgaard thanks for the suggestion. There are plans to add svd and pinv as well. I welcome contributors for these along with what you suggested.
@jakobdalsgaard try this https://github.com/RaghavCodeHub/matrix?tab=readme-ov-file#19-generate.
For generating identity matrix use:
matrix.gen(1).diag(3);