Comments (4)
For sure! In a new folder, create a simple package.json file containing
{ "dependencies": { "eigen": "^0.2.2" } }
Create a file named test.mjs containing
`
// test.mjs
import eig from 'eigen';
(async () => {
await eig.ready;
let M = new eig.Matrix([[1, 2], [3, 4]]);
M.print("M");
M = M.inverse();
M.print("Minv");
eig.GC.flush();
})();
`
Now run yarn
in that folder to install dependencies, and execute the test using node test.mjs
from eigen-js.
Yes, this worked now, but sometimes it breaks with the error TypeError: eigen_1.default.Matrix is not a constructor
. I got this intermittently in an Observable notebook.
Maybe this is something related to asynchronous loading of the wasm?
from eigen-js.
Ah, I never tried it in that context. Not sure how Observable handles package loading...
from eigen-js.
I'm not saying this is just on Observable but in both contexts, this is an intermittent error that needs some debugging, maybe using async import()
in typescript helps.
from eigen-js.
Related Issues (13)
- Implement solve methods for QR and SVD decompositions HOT 5
- LU decomposition returns wrong values HOT 4
- One doubt about inverse of this case of matrix HOT 1
- LU Solve Linear Systems HOT 1
- Type declarations HOT 1
- License
- No dist HOT 5
- index.js got an error HOT 1
- Proper way to use Garbage Collector HOT 2
- Yarn build without OSQP broken
- Interested in contributing HOT 2
- The benchmarking of inversing Matrix is with a Matrix of integer numbers or float numbers? HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eigen-js.