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

fix: updates MathArray types to be n-dimensional #3306

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

orelbn
Copy link
Contributor

@orelbn orelbn commented Oct 31, 2024

Description

Test

  • Added n-dimensional type tests
  • Updated multiply tests

Additional Notes

@orelbn orelbn marked this pull request as ready for review October 31, 2024 20:00
@orelbn
Copy link
Contributor Author

orelbn commented Oct 31, 2024

Does multiplying arrays greater than 1-d together always result in an array, or can it result in a scalar? If that is the case, I can improve the multiplication types further.

Copy link
Owner

@josdejong josdejong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good, this is a neat improvement!

Does multiplying arrays greater than 1-d together always result in an array, or can it result in a scalar? If that is the case, I can improve the multiplication types further.

Yes that is correct. I'll await the improvements that you have in mind before merging this PR 😄

test/typescript-tests/testTypes.ts Show resolved Hide resolved
@orelbn
Copy link
Contributor Author

orelbn commented Nov 6, 2024

reater than 1-d together always result in an arr

Updated.

I did notice that when I multiply two arrays, where one contains a unit, the order matters because the conj function is not supported on units. I'm not sure if that is a possible future improvement for Conj.

image

@josdejong
Copy link
Owner

Thanks for the update 👍

I did notice that when I multiply two arrays, where one contains a unit, the order matters because the conj function is not supported on units. I'm not sure if that is a possible future improvement for Conj.

Good find, I would expect that to work both ways instead of just one. Can you open a separate issue for this?

Merging your improvemens in the v14 branch now!

@josdejong josdejong merged commit b10e316 into josdejong:v14 Nov 7, 2024
8 checks passed
@josdejong josdejong added this to the v14 milestone Nov 7, 2024
@josdejong josdejong mentioned this pull request Nov 7, 2024
7 tasks
@josdejong
Copy link
Owner

Published now in v14.0.0, thanks again.

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

Successfully merging this pull request may close these issues.

2 participants