Skip to content

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

Open
@BaseMax

Description

@BaseMax
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")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions