-
Notifications
You must be signed in to change notification settings - Fork 769
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
function is not a known member of module in numpy. reportGeneralTypeIssues #106
Comments
Same goes for sqlalchemy objects where for example session methods like commit or add are unrecognized (probably dynamic methods based on database type). Maybe this could be at least split to independent diagnostics which can be turned off or severity level could be overridden independently. |
You have a type checking mode enabled, which means you're going to get more errors for untyped code or potentially missing types. See #93 for numpy; most of numpy is compiled and we don't have the information from compiled modules. PyTorch ships with annotations and stubs, if you believe the signature for FloatTensor's constructor to be wrong you may want to file a bug on their tracker. @johnybx This diagnostic is disabled by default (type checking mode "off"). I assume you mean when the mode is not just "off"? |
Also, note that you can do |
@jakebailey I mean that I would like to have checking mode basic but I would like to have diagnostic |
Closing in favor of #150, which is covering general numpy support. |
My question would be where to find these stubs (at least for |
They are in their repo, a mix of stubs and inline annotations: https://github.com/pytorch/pytorch |
@AgentIvan This issue is a dupe of #150 (which is not closed); you can follow there. |
When I use numpy or torch etc, the Pylance alert that some function is not a known member of module.
My python environment is anaconda.
The text was updated successfully, but these errors were encountered: