Replies: 1 comment
-
Thanks for letting us know, I've fixed the example. About the performance:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, this part of the code in the documentation seems out of date
![image](https://private-user-images.githubusercontent.com/117000057/305394151-b56ff649-2564-480f-a5d8-ceee1777e07d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg4MzksIm5iZiI6MTczOTI1ODUzOSwicGF0aCI6Ii8xMTcwMDAwNTcvMzA1Mzk0MTUxLWI1NmZmNjQ5LTI1NjQtNDgwZi1hNWQ4LWNlZWUxNzc3ZTA3ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwNzIyMTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lZjhkYzkwMTE2NjQ2NDE0MDBlM2I1MzA5YTYxODE5OGE3NzUwMmNmMTEwZTdjODUyYWEzYWE4N2YyNWM4NWE2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.OYp26Ly1CcU7l8nlorJ-vh_7SL8W5eX2kYLwnISBmhY)
![image](https://private-user-images.githubusercontent.com/117000057/305394033-9d83597d-206f-4cc4-af34-1784515cb28a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNTg4MzksIm5iZiI6MTczOTI1ODUzOSwicGF0aCI6Ii8xMTcwMDAwNTcvMzA1Mzk0MDMzLTlkODM1OTdkLTIwNmYtNGNjNC1hZjM0LTE3ODQ1MTVjYjI4YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIxMVQwNzIyMTlaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT05Mjc1YjNlZmFiZjJmYTMwNDQzZDY1MjliYmQ2ZDdiNDUyNTJmM2Q0YjhlNjdlNGNjOTIxNWQxYzkzODYwNmVlJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.QmUd2FvZgPAW1hnCFDd-ZQI57JZWls0L3mvjv9HS7T8)
https://mathjs.org/docs/datatypes/matrices.html#arrays-and-matrices
Suppose I have an array t, and I want to use the evaluate function to perform sqrt operation on each number in it, such as evaluate("sqrt(t)"). This expression is grammatically wrong.
So I tried the following code. I think the expression tree we built can be reused in this operation. Besides using a for loop, is there any more efficient way?
Beta Was this translation helpful? Give feedback.
All reactions