1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Wed, 5 Jul 2023 05:36:58 +0000
Subject: Fix SyntaxWarning
Forwarded: not-needed
---
pysph/solver/vtk_output.py | 2 +-
pysph/tools/read_mesh.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pysph/solver/vtk_output.py b/pysph/solver/vtk_output.py
index c472038..7a105e7 100644
--- a/pysph/solver/vtk_output.py
+++ b/pysph/solver/vtk_output.py
@@ -33,7 +33,7 @@ class VTKOutput(Output):
self.vectors = {}
for name, vector in vectors.items():
- assert (len(vector) is 3)
+ assert (len(vector) == 3)
self.vectors[name] = vector
def set_output_scalar(self, scalars=None):
diff --git a/pysph/tools/read_mesh.py b/pysph/tools/read_mesh.py
index 9b91807..ea33952 100644
--- a/pysph/tools/read_mesh.py
+++ b/pysph/tools/read_mesh.py
@@ -85,7 +85,7 @@ def mesh2points(file_name, dx, file_format=None, uniform=False):
xf, yf, zf = surface_points(x, y, z, cells, dx)
else:
- if file_format is 'stl':
+ if file_format == 'stl':
normals = mesh.mesh.cell_data['facet_normals'][0]
else:
normals = mesh.compute_normals()
|