Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object numeric has to be available globally #84

Open
JuStTheDev opened this issue Nov 3, 2018 · 0 comments
Open

Object numeric has to be available globally #84

JuStTheDev opened this issue Nov 3, 2018 · 0 comments

Comments

@JuStTheDev
Copy link

I am using numeric in a Typescript-Surrounding. If my ts-File looks like this:

import * as numeric from numeric;
...
class abc {
    ...
    function xyz() {
        const hessian = [[1,2], [3,4]]; //some matrix here
        const eigenValues = numeric.eig(hessian);
    }
}

this will fail during runtime. If I add window.numeric = numeric and then call window.numeric.eig it will work fine but through errors due to invalid TS.
To find the source of Error I have to step into the toUpperHessenberg-Function
image
and there on line 1368, a virtual js-File is created (I suspect the clone oder identity-Call) which looks like this:
image
and in that scope, numeric is undefined, if it's as I mentioned, not in the window-Scope for example.

I can't really figure out what happens here exactly with this virtual file and would be glad for any advice it I got it completely wrong this time. Else, this is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant