Skip to content
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

SyntaxWarning: "is not" with a literal. Did you mean "!="? #2

Open
BaseMax opened this issue Nov 7, 2022 · 0 comments
Open

SyntaxWarning: "is not" with a literal. Did you mean "!="? #2

BaseMax opened this issue Nov 7, 2022 · 0 comments

Comments

@BaseMax
Copy link

BaseMax commented Nov 7, 2022

SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if a.dtype is not "uint8":
SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if b.dtype is not "uint8":
For solve the problem, we must change the following:
if a.dtype is not "uint8":
    a = a.astype("uint8")

if b.dtype is not "uint8":
    b = b.astype("uint8")

to:

if a.dtype != "uint8":
    a = a.astype("uint8")

if b.dtype != "uint8":
    b = b.astype("uint8")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant