We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a05c626 commit 54432c9Copy full SHA for 54432c9
grudge/discretization.py
@@ -120,11 +120,12 @@ def as_part_id(mesh_part_id):
120
# Single-volume
121
if mpi_communicator is not None:
122
# Accept PartID or rank
123
+ from numbers import Integral
124
def as_part_id(mesh_part_id):
125
if isinstance(mesh_part_id, PartID):
126
return mesh_part_id
- elif isinstance(mesh_part_id, int):
127
- return PartID(VTAG_ALL, mesh_part_id)
+ elif isinstance(mesh_part_id, Integral):
128
+ return PartID(VTAG_ALL, int(mesh_part_id))
129
else:
130
raise TypeError(f"Unable to convert {mesh_part_id} to PartID.")
131
0 commit comments