Skip to content

Object numeric has to be available globally #84

Description

@JuStTheDev

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions