Skip to content

Commit

Permalink
Update for numpy 2 (#745)
Browse files Browse the repository at this point in the history
* Switch MeshInfo.cell_zones and MeshInfo.face_zones keys to int instead of np.int32

* Switch MeshInfo.cell_zones_to_face_zones keys to int instead of np.int32
  • Loading branch information
PProfizi authored Nov 8, 2024
1 parent 8b1354e commit 3f3577f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ansys/dpf/post/mesh_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def face_zones(self) -> dict:
string_field = self._core_object.get_property("face_zone_names")
for zone_id in string_field.scoping.ids:
zone_name = string_field.get_entity_data_by_id(zone_id)[0]
zones[zone_id] = zone_name
zones[zone_id.item()] = zone_name
self._face_zones = zones
return self._face_zones

Expand All @@ -164,7 +164,7 @@ def cell_zones(self) -> dict:
string_field = self._core_object.body_names
for zone_id in string_field.scoping.ids:
zone_name = string_field.get_entity_data_by_id(zone_id)[0]
zones[zone_id] = zone_name
zones[zone_id.item()] = zone_name
self._cell_zones = zones
return self._cell_zones

Expand Down Expand Up @@ -192,6 +192,6 @@ def cell_zones_to_face_zones(self) -> dict:
face_zone_ids = property_field.get_entity_data_by_id(
cell_zone_id
).tolist()
result[cell_zone_id] = face_zone_ids
result[cell_zone_id.item()] = face_zone_ids
self._cell_zones_to_face_zones = result
return self._cell_zones_to_face_zones

0 comments on commit 3f3577f

Please sign in to comment.