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

MathArray typescript type definition only handles 1D and 2D arrays #3098

Open
Amolition opened this issue Dec 6, 2023 · 3 comments
Open

Comments

@Amolition
Copy link

Amolition commented Dec 6, 2023

Description
The MathArray typescript type cannot accept any N-dimensional arrays (it is limited to 1D or 2D arrays). This is despite many/all functions where the MathArray type is used being capable of handling and returning arbitrary n-dimensional arrays

To Reproduce
Use a function from mathjs which accepts a MathCollection or MathArray parameter in a typescript file. Try to apply the function to a 3D or greater dimensional array. Typescript linters will claim there is an incorrect type but the function should run normally and output the result as expected.

@josdejong
Copy link
Owner

Good point to see if we can improve on this 👍

@rakheesingh
Copy link

@josdejong what exactly need to improve herr, which functions doesn't take multi dimensional array?

@josdejong
Copy link
Owner

See #3099

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

No branches or pull requests

3 participants