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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDI4MjgsIm5iZiI6MTczOTAwMjUyOCwicGF0aCI6Ii8xMTcwMDAwNTcvMzA1Mzk0MTUxLWI1NmZmNjQ5LTI1NjQtNDgwZi1hNWQ4LWNlZWUxNzc3ZTA3ZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOFQwODE1MjhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hMTg2M2M0OTgzZGNhMWY1ZDQ4YWNjMWVlNTFjZjliMWNjMTMxN2Y5ZGM0ZWJhZmMwMDNjNTk3MDc1YzZmNjMyJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.Wm9u-ZDYvJCxc8yqeDh4CXQQ-VpctRFT6FMbIz8WnB8)
![image](https://private-user-images.githubusercontent.com/117000057/305394033-9d83597d-206f-4cc4-af34-1784515cb28a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDI4MjgsIm5iZiI6MTczOTAwMjUyOCwicGF0aCI6Ii8xMTcwMDAwNTcvMzA1Mzk0MDMzLTlkODM1OTdkLTIwNmYtNGNjNC1hZjM0LTE3ODQ1MTVjYjI4YS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwOFQwODE1MjhaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0xZTkxMjc3NmIxNGNkZmZmNzg3ZGNkMzkzMDY2MGE2OGE3YTc2ODY4MjIwNTc0MDZjZTk3Y2ZjNmVlOWM1MjA0JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.-1hw-WDZkwLl2UkgrBKC9-P4lBhOdRohlq0C2rOE_Ec)
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