From 145b41216fa7e9a91f5c240c4a73e927f0f94eef Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Tue, 5 Nov 2024 18:33:46 +0100 Subject: [PATCH 1/3] Remove numpy restriction to <2 Signed-off-by: paul.profizi --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7722dd8ef38..abbeeea02b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,7 +30,7 @@ dependencies = [ "google-api-python-client", "grpcio >=1.63.0", "importlib-metadata >=4.0", - "numpy<2", + "numpy", "packaging", "protobuf", "psutil", From 4c2bf04c9315c9b9454010783f021328a041bf24 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Wed, 6 Nov 2024 18:33:11 +0100 Subject: [PATCH 2/3] Update docstrings for numpy>=2 Signed-off-by: paul.profizi --- src/ansys/dpf/core/custom_fields_container.py | 4 ++-- src/ansys/dpf/core/model.py | 2 +- src/ansys/dpf/core/nodes.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ansys/dpf/core/custom_fields_container.py b/src/ansys/dpf/core/custom_fields_container.py index dd6917f00ca..3595136b179 100644 --- a/src/ansys/dpf/core/custom_fields_container.py +++ b/src/ansys/dpf/core/custom_fields_container.py @@ -294,9 +294,9 @@ class BodyFieldsContainer(FieldsContainer): >>> model = dpf.Model(examples.download_all_kinds_of_complexity_modal()) >>> fc = model.results.displacement.on_all_time_freqs.split_by_body.eval() >>> fc.get_mat_scoping().ids[3] - 45 + np.int32(45) >>> len(fc.get_fields_by_mat_id(45)) - 45 + np.int32(45) >>> f_time_2 = fc.get_field_by_mat_id(45, timeid=2) """ diff --git a/src/ansys/dpf/core/model.py b/src/ansys/dpf/core/model.py index e5d8d8a625a..d149ce288b3 100644 --- a/src/ansys/dpf/core/model.py +++ b/src/ansys/dpf/core/model.py @@ -105,7 +105,7 @@ def metadata(self): >>> meshed_region = model.metadata.meshed_region >>> meshed_region.elements.scoping.ids[2] - 759 + np.int32(759) Get the data sources of the model. diff --git a/src/ansys/dpf/core/nodes.py b/src/ansys/dpf/core/nodes.py index ca8e5cb46f4..8db606d72be 100644 --- a/src/ansys/dpf/core/nodes.py +++ b/src/ansys/dpf/core/nodes.py @@ -214,7 +214,7 @@ def scoping(self): >>> meshed_region = model.metadata.meshed_region >>> nodes = model.metadata.meshed_region.nodes >>> nodes.scoping.ids[2] - 3 + np.int32(3) """ return self._mesh._get_scoping(loc=locations.nodal) From 6c0f86b278466f51b16b637454e85f93eda153da Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Thu, 7 Nov 2024 10:28:42 +0100 Subject: [PATCH 3/3] Update docstrings for numpy>=2 Signed-off-by: paul.profizi --- src/ansys/dpf/core/custom_fields_container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansys/dpf/core/custom_fields_container.py b/src/ansys/dpf/core/custom_fields_container.py index 3595136b179..42e12d175d8 100644 --- a/src/ansys/dpf/core/custom_fields_container.py +++ b/src/ansys/dpf/core/custom_fields_container.py @@ -296,7 +296,7 @@ class BodyFieldsContainer(FieldsContainer): >>> fc.get_mat_scoping().ids[3] np.int32(45) >>> len(fc.get_fields_by_mat_id(45)) - np.int32(45) + 45 >>> f_time_2 = fc.get_field_by_mat_id(45, timeid=2) """