-
Notifications
You must be signed in to change notification settings - Fork 247
Add types to elementwise.py #850
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
0707a8c
to
ab7ae49
Compare
🤔 What makes you say that? Lines 1004 to 1005 in 2acc9f7
|
Hm, mostly an unwavering trust in pyright:
Not quite sure what it doesn't like then, since it should see the |
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.
Thx! Only two minor nits.
Note that this goes the other way! |
ab7ae49
to
f7c969d
Compare
🤦 It makes a lot more sense when you actually read it, yeah :( Should be fixed now! |
f7c969d
to
bcd30d5
Compare
bcd30d5
to
2b799d7
Compare
Thx! |
This adds types pretty much all things in
elementwise.py
. There are some remaining errors that I'm not sure how to best handle:context_dependent_memoize
expects something hashable as a first argument, mostly due to this:pyopencl/pyopencl/tools.py
Line 583 in 2acc9f7
However, the
cl.Context
that the functions in elementwise use is very much not hashable (?).ScalarLike
alias for some functions inarray.py
.range
andslice
inElementwiseKernel
and used named that don't shadow global functions instead. Went for this so that their types are not hidden in thekwargs
.