From f66aaa04df13335e699242fb720c90df4e534d2a Mon Sep 17 00:00:00 2001 From: Kohsaka Date: Sat, 4 Feb 2023 09:57:58 +0900 Subject: [PATCH] fix: incompatibility with numpy 1.24 The deprecation for the aliases np.float and np.int was expired in numpy 1.24. --- nanonispy/read.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nanonispy/read.py b/nanonispy/read.py index a6c49f8..a5b07c2 100644 --- a/nanonispy/read.py +++ b/nanonispy/read.py @@ -633,11 +633,11 @@ def _parse_sxm_header(header_raw): for key in entries_to_be_floated: if isinstance(header_dict[key], list): - header_dict[key] = np.asarray(header_dict[key], dtype=np.float) + header_dict[key] = np.asarray(header_dict[key], dtype=float) else: - header_dict[key] = np.float(header_dict[key]) + header_dict[key] = float(header_dict[key]) for key in entries_to_be_inted: - header_dict[key] = np.asarray(header_dict[key], dtype=np.int) + header_dict[key] = np.asarray(header_dict[key], dtype=int) return header_dict