From 308022b85fda651737d53a7350ddd23d984de734 Mon Sep 17 00:00:00 2001 From: SarahAlidoost Date: Fri, 23 May 2025 15:01:06 +0200 Subject: [PATCH] fix dtype of string column to avoid warning from dask --- stmtools/_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stmtools/_io.py b/stmtools/_io.py index 3908c7a..fa9c5be 100644 --- a/stmtools/_io.py +++ b/stmtools/_io.py @@ -112,7 +112,7 @@ def from_csv( # specify str type for point id # otherwise it will be loaded as objest type # then when saving to zarr, a redundant loading is needed to determine type - da_pnt = ddf[column].to_dask_array(lengths=chunks).astype(str) + da_pnt = ddf[column].astype(str).to_dask_array(lengths=chunks).astype(str) else: da_pnt = ddf[column].to_dask_array(lengths=chunks) stmat = stmat.assign({column: (("space"), da_pnt)})