matrix icon indicating copy to clipboard operation
matrix copied to clipboard

Maybe expose more?

Open jakobdalsgaard opened this issue 1 year ago • 1 comments

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 avatar Mar 26 '24 21:03 jakobdalsgaard

@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.

raghav-coding avatar Mar 27 '24 16:03 raghav-coding

@jakobdalsgaard try this https://github.com/RaghavCodeHub/matrix?tab=readme-ov-file#19-generate.

For generating identity matrix use:

matrix.gen(1).diag(3);

raghav-coding avatar Jun 16 '24 07:06 raghav-coding