The following works for me:
import { zeros } from "mathjs";
const w = zeros(5, 5);
but I'm trying to do something like: math.zeros(5, 5) as what I saw in the documentation https://mathjs.org/docs/reference/functions/zeros.html which will allow me to use math to access a lot of functions such us math.matrix(), math.square(array) ...etc. But when I try to do the following:
import { math } from "mathjs";
const w = math.zeros(5, 5);
I get the following error
SyntaxError: The requested module 'mathjs' does not provide an export named 'math'
my package.json looks like this:
{
. . .
"type": "module",
. . .
"dependencies": {
"mathjs": "^11.5.1"
}
}