From 70235e7d364c87294ec08cd080baf97bf3ca7eab Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 3 Sep 2026 16:50:13 -0500 Subject: [PATCH] Avoid deprecated setting of ndarray shape attribute --- src/openmc_mcnp_adapter/openmc_conversion.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/openmc_mcnp_adapter/openmc_conversion.py b/src/openmc_mcnp_adapter/openmc_conversion.py index 3898646..4aa8737 100644 --- a/src/openmc_mcnp_adapter/openmc_conversion.py +++ b/src/openmc_mcnp_adapter/openmc_conversion.py @@ -777,8 +777,7 @@ def get_universe(uid): lattice.dimension = shape # Universe IDs array as ([z], y, x) - univ_ids = np.asarray(univ_ids, dtype=int) - univ_ids.shape = shape[::-1] + univ_ids = np.asarray(univ_ids, dtype=int).reshape(shape[::-1]) # Depending on the order of the surfaces listed, it may be # necessary to flip some axes