diff --git a/src/nxmx/__init__.py b/src/nxmx/__init__.py index 3fbf560..e0e675a 100644 --- a/src/nxmx/__init__.py +++ b/src/nxmx/__init__.py @@ -917,7 +917,7 @@ def underload_value(self) -> int | None: to the underload_value. """ if "underload_value" in self._handle: - return int(self._handle["underload_value"][()]) + return int(self._handle["underload_value"][()].item()) return None @cached_property @@ -932,7 +932,7 @@ def saturation_value(self) -> int | None: """ if "saturation_value" in self._handle: try: - return int(self._handle["saturation_value"][()]) + return int(self._handle["saturation_value"][()].item()) except TypeError as e: logger.warning(f"Error extracting {self.path}/saturation_value: {e}") return None