-
Notifications
You must be signed in to change notification settings - Fork 173
Sinh & cosh numpy_intrinsic functions implemented #1002
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
Conversation
|
@czgdp1807 could you please help me with this error? |
d671c65 to
6e3f27b
Compare
integration_tests/elemental_05.py
Outdated
| for j in range(size2): | ||
| for k in range(size3): | ||
| for l in range(size4): | ||
| assert abs( ((sinh(array[i, j, k, l])%3) +2)/2 - result[i, j, k, l]) <= eps |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@certik Builtin % in LPython doesn't work on arrays by default because it is implemented as a function and not a binop. So the question is which approach to follow,
- To make
_modfunction defined inlpython_builtin.pyvectorised; - Define
Modasbinopand then usebuilder->CreateSRemin LLVM backend. Note that not all backends might support modulus operation on types other than integers. - Define
modand then make it vectorisable.
I think 3rd approach is a good one and complies with Python and NumPy standards. What do you say @certik?
4132dc8 to
7757d59
Compare
czgdp1807
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@certik This is ready to merge.
certik
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good, thanks!
Co-authored-by: Madhav2310 <madhav.mittal.mat19@itbhu.ac.in>
Co-authored-by: Madhav2310 <madhav.mittal.mat19@itbhu.ac.in>
Co-authored-by: Madhav2310 <madhav.mittal.mat19@itbhu.ac.in>
Co-authored-by: Madhav2310 <madhav.mittal.mat19@itbhu.ac.in>
7757d59 to
54e5bd0
Compare
No description provided.