-
Notifications
You must be signed in to change notification settings - Fork 102
[cv2] Completed type stubs for the following functions and their shared parameters: #112
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
[cv2] Completed type stubs for the following functions and their shared parameters: #112
Conversation
675265b
to
650dba1
Compare
29e2783
to
9063684
Compare
…ameters: norm resize cvtColor imread inRange imwrite calcHist normalize compareHist matchTemplate minMaxLoc bitwise_and ndarray
9063684
to
66168fc
Compare
Any update? This has been stalling for over 4 months without any acknowledgment. |
Sorry forgot about this PR. I was hoping this OpenCV PR was going to solve everything. Only suggestion would be to use the OpenCV alias names for parameters like Mat instead ndarray directly. I'm no openCV expert, not sure is Mat is exactly an ndarry though. |
Oh looks like they might be adding some autogenerated type stubs soon. That would be nice.
The type alias don't exist yet, but I can easily do
Not an expert either, but I know that |
does pandas dtype example help? maybe https://github.com/python/typeshed/blob/master/CONTRIBUTING.md#conventions |
More discussion here. python/typing#516 |
does numpy.DTypeLike help? I see pandas using that a lot |
Or even |
Thanks for the contributions. Going forward I'd like to fix a bunch of the return types too. |
hmm. np.generic might only work for python version 3.9. |
Is something not working? numpy.generic has been added 17 years ago. However the type stub has only been created around 3 years ago. |
still need to test on python 3.8 and 3.7... just saw similar issue with panda's test failing |
Why the |
cv2.norm
cv2.resize
cv2.cvtColor
cv2.imread
cv2.inRange
cv2.imwrite
cv2.calcHist
cv2.normalize
cv2.compareHist
cv2.matchTemplate
cv2.minMaxLoc
cv2.bitwise_and
ndarray
I filled in the type stubs based on our usage in https://github.com/Toufool/Auto-Split (Toufool/AutoSplit/pull/92) and what documentation I could find online.
Fixes microsoft/pylance-release/issues/2089