From 7717f0aed9f563b5837a1c59fc3637ef85a81ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Robert?= Date: Thu, 20 Jul 2023 12:05:28 +0200 Subject: [PATCH] BUG: avoid deprecated numpy API in flash frontend (implicit conversion of 1-sized arrays to scalar types is deprecated in numpy 1.25) --- yt/frontends/flash/data_structures.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yt/frontends/flash/data_structures.py b/yt/frontends/flash/data_structures.py index 24c8d2f0bd6..5452b928cde 100644 --- a/yt/frontends/flash/data_structures.py +++ b/yt/frontends/flash/data_structures.py @@ -287,11 +287,11 @@ def _find_parameter(self, ptype, pname, scalar=False): def _parse_parameter_file(self): if "file format version" in self._handle: - self._flash_version = int(self._handle["file format version"][:]) + self._flash_version = self._handle["file format version"][:].item() elif "sim info" in self._handle: - self._flash_version = int( - self._handle["sim info"][:]["file format version"] - ) + self._flash_version = self._handle["sim info"][:][ + "file format version" + ].item() else: raise RuntimeError("Can't figure out FLASH file version.") # First we load all of the parameters