From a5392d40ad0807bfa54efcdc84f2d14324c2404a Mon Sep 17 00:00:00 2001 From: Paul Harris Date: Fri, 24 May 2024 16:06:36 +0300 Subject: [PATCH 1/2] Python 3 removed as language classifier --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ee6b3bb..2f68970 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,6 @@ classifiers = [ "Intended Audience :: Science/Research", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python:: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", From 228da7e9ba90a74523e3867f68e4d0aa8973bbff Mon Sep 17 00:00:00 2001 From: jacrossley <40207794+jacrossley@users.noreply.github.com> Date: Mon, 17 Jun 2024 16:00:37 +0100 Subject: [PATCH 2/2] Update hdf5.py The function _convert_scalar_item contained np.asscalar which was depreciated in NumPy v1.16: `scalar_value = np.asscalar(np.asarray(item['value']))` This line has been changed to `scalar_value = np.asarray(item['value']).item()` --- phconvert/hdf5.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phconvert/hdf5.py b/phconvert/hdf5.py index 32d638f..502010d 100644 --- a/phconvert/hdf5.py +++ b/phconvert/hdf5.py @@ -791,7 +791,7 @@ def _convert_scalar_item(item): if not np.isscalar(item['value']): try: # sequences are converted to array then to scalar - scalar_value = np.asscalar(np.asarray(item['value'])) + scalar_value = np.asarray(item['value']).item() except ValueError: raise Invalid_PhotonHDF5('Cannot convert "%s" to scalar.' % item['meta_path'])