-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
π·οΈ ufunc annotations for logical_{not,and,or,xor}
#324
π·οΈ ufunc annotations for logical_{not,and,or,xor}
#324
Conversation
logical-{not,and,or,xor}
logical-{not,and,or,xor}
logical_{not,and,or,xor}
@jorenham I see the difference between them. Should I create a new class for the logical-related functions, or is there an existing class in the codebase that I might have missed? Just wondering if there's something already available before I go ahead with a new one. π |
I don't that there's anything like that in the numtype codebase yet. I also couldn't find anything salvageable for this in Kudo's for your "don't reinvent the wheel" mindset, BTW ππ» FYI, the default callable protocol includes a workaround for numtype/src/numpy-stubs/_typing/_ufunc.pyi Lines 837 to 846 in b827c82
But that's a rather awkward solution that should only be seen as a "last-result fallback placeholder workaround default" thing (but this PR shows that I'm preaching to the choir). |
Not kind of sure about the implementation if great or not. I try my best to handle all kind of situations~ |
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.
This is a pretty difficult signature to annotate, so it might take a couple of tries to get it right.
It's also no problem if you're not able to figure it out yet. So if that's the case then I wouldn't mind helping out here.
Hereβs a simple note I learned from this discussion:
Big thanks for the explanation! This is what I learned from u, and I noted it down so others can also share this knowledge. π merci @jorenham |
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.
Good progress πͺπ».
Here's the next iteration of comments, hopefully they make sense.
a3cf8a1
to
f7df097
Compare
f7df097
to
a3cf8a1
Compare
Co-Authored-By: Joren Hammudoglu <[email protected]>
a3cf8a1
to
ecb6397
Compare
Co-Authored-By: Joren Hammudoglu <[email protected]>
Updated~ Thanks for comments learn a lots |
Oh sorry, my fault π€¦ |
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.
Almost there!
Co-Authored-By: Joren Hammudoglu <[email protected]>
Big thanks again! |
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 didn't notice this one before; sorry about that. But that one aside, I've got nothing to complain about anymore ππ»
Co-authored-by: Joren Hammudoglu <[email protected]>
Updated, thanks for helping out and taught me a lots! |
In it goes β Thanks Guan-Ming π |
Towards #230