From 3f3577f69447a533b4ad022b0f85a150b6aebaf0 Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Fri, 8 Nov 2024 15:28:11 +0100 Subject: [PATCH] Update for numpy 2 (#745) * 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 --- src/ansys/dpf/post/mesh_info.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ansys/dpf/post/mesh_info.py b/src/ansys/dpf/post/mesh_info.py index 8ce9e90e0..e02b3acc4 100644 --- a/src/ansys/dpf/post/mesh_info.py +++ b/src/ansys/dpf/post/mesh_info.py @@ -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 @@ -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 @@ -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