-
Notifications
You must be signed in to change notification settings - Fork 163
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
[numpy] add trunc #2316
[numpy] add trunc #2316
Conversation
Intrinsic functions should be implemented using the IntrinsicFunction approach. See for example how sin/cos is implemented. |
Hi, @certik! Thanks for looking into it. I've added |
Excellent, this looks great. @Thirumalai-Shaktivel would you mind reviewing this please? Didn't we have some shorter way to define these common intrinsics? I don't see how right now, so this might be the way to do it. |
I think we can use the The only difference between them is the type I will add this to my to-do list, to redesign the handling. |
I see, we cannot include an instantiate function in the |
After you fix #2316 (comment), go ahead and click on "Ready for review", I'll give it one final review. |
@Thirumalai-Shaktivel yes I agree, let's merge this PR as is, and we'll redesign later. We should probably create macros for the most common cases and just use them. |
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 fine.
@czgdp1807 I think you probably want to merge this after the ASR sync is done, correct? |
Correct. |
Thanks very much for reviewing the PR @certik, @Thirumalai-Shaktivel, and @Shaikh-Ubaid! |
Thanks @khushi-411 for the PR! We'll merge it once the ASR sync is complete. |
Hi,
The PR adds the
trunc
function to the lpython library. It follows the issue #959.cc: @certik @czgdp1807
Looking forward to hearing your thoughts and feedback on this addition. Thank you for your time!
One thing that's been on my mind is whether we have style checks like flake8, clang, or lintrunner in lpython. Do you think it would be a good idea to include them?
Thanks! :)