From 6d101baf74b66118c4a6bc23a55d27cc489ad1f2 Mon Sep 17 00:00:00 2001 From: Peter Kraus Date: Thu, 22 Feb 2024 17:07:54 +0100 Subject: [PATCH] Fix dtype issue. (#91) --- setup.py | 2 +- src/dgpost/utils/extract.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 6d1bf84..ed1f91e 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ "chemicals>=1.0.0", "rdkit>=2022.3", "h5netcdf~=1.0", - "xarray < 2023.11", + "xarray ~= 2024.02", "xarray-datatree>=0.0.12", "dgbowl-schemas>=116", "matplotlib>=3.5.0", diff --git a/src/dgpost/utils/extract.py b/src/dgpost/utils/extract.py index 572de2b..82e3f76 100644 --- a/src/dgpost/utils/extract.py +++ b/src/dgpost/utils/extract.py @@ -256,7 +256,7 @@ def get_key_recurse(dt, keys): if len(vals.coords.dims) > 1: assert "uts" in vals.coords.dims for coord in vals.coords.dims: - if vals.coords.dtypes[coord] in {np.dtype("O")}: + if vals.coords.dtypes[coord].kind in {"O", "U"}: splits = vals[coord].values break else: