Skip to content

Cannot import BigNumber, Fraction, Matrix, Array #546

@josdejong

Description

@josdejong

Math.js currently does not allow importing constants being a BigNumber, Fraction, Matrix, or Array.

math.import({foo: math.bignumber(42)})  // error

This is caused by isSupportedType lacking checks for these data types, see code:

https://github.com/josdejong/mathjs/blob/master/lib/core/import.js#L227-L241

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions