popcornell/pyGF2

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

Opened this issue · 0 comments

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