-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Simplify not working with matrix multiplication? #2614
Comments
Thanks for reporting, that sounds like a bug, Anyone able to help debugging/fixing this issue in |
I took a look at this as it appears the issue still occurs. The reason for mathjs/src/function/algebra/simplifyCore.js Lines 205 to 223 in 4a26b06
In this logic, both the matrix nodes are considered Skipping that one condition wouldn't be enough though. It seems that most the simplification rules are for use in a one-dimensional algebraic context in which there can be unknowns and are thus not needed for constant matrix simplification. Instead it seems to me that we would need a new, separate set of logic specifically for matrix simplification and evaluation. |
Thanks for debugging this @soleilcot , this makes sense indeed. So as a first step we may need to add a check on whether the value we're operating on is a numeric value and not a Matrix or something else I think? Like adding a check |
Shouldn't the following produce the same result?
When I run the code,
evaluate
produces the expected output ([17, 39]
), butsimplify
does not (it instead produces0
which doesn't seem right).The text was updated successfully, but these errors were encountered: