Skip to content

Commit

Permalink
Fix Python warning "is" with a literal
Browse files Browse the repository at this point in the history
  • Loading branch information
paumard committed Jan 17, 2024
1 parent fa9c4f0 commit 38c25de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/gyoto/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def rayTrace(sc,
else:
raise TypeError('coord2dset must be a gyoto.core.Coord2dSet subclass or instance')

if isinstance(coord2dset, core.Grid) and scalars is 0 :
if isinstance(coord2dset, core.Grid) and scalars == 0 :
dims=(ny, nx)
array_double_fromnumpy1or2=core.array_double.fromnumpy2
array_double_fromnumpy2or3=core.array_double.fromnumpy3
Expand Down Expand Up @@ -289,7 +289,7 @@ def rayTrace(sc,
# Perform the actual ray-tracing
sc.rayTrace(coord2dset, aop)

if scalars is 2:
if scalars == 2:
for key in res:
res[key]=res[key][0]

Expand Down

0 comments on commit 38c25de

Please sign in to comment.