From 38c25deba22a28a54e57dcd456fbb9f3877ea3cb Mon Sep 17 00:00:00 2001 From: Thibaut Paumard Date: Wed, 17 Jan 2024 21:54:49 +0100 Subject: [PATCH] Fix Python warning "is" with a literal --- python/gyoto/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/gyoto/util.py b/python/gyoto/util.py index 501fe6fa..9c3f4994 100644 --- a/python/gyoto/util.py +++ b/python/gyoto/util.py @@ -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 @@ -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]