From 35ae82bd63d80573c0cbe147b908f9832da91fe8 Mon Sep 17 00:00:00 2001 From: Kai Zhang Date: Sun, 15 Dec 2024 09:16:58 +0800 Subject: [PATCH] compression algorithm except deflate doesn't work with strings --- anndata-hdf5/src/lib.rs | 5 ++++- python/pyproject.toml | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/anndata-hdf5/src/lib.rs b/anndata-hdf5/src/lib.rs index 8584565..0d337b4 100644 --- a/anndata-hdf5/src/lib.rs +++ b/anndata-hdf5/src/lib.rs @@ -126,7 +126,10 @@ fn new_dataset( builder = if let Some(compression) = config.compression { match compression { Compression::Gzip(lvl) => builder.deflate(lvl), - Compression::Lzf => builder.lzf(), + Compression::Lzf => match dtype { + ScalarType::String => builder.deflate(1), + _ => builder.lzf(), + } } } else { builder diff --git a/python/pyproject.toml b/python/pyproject.toml index 928998d..266cae0 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -26,7 +26,6 @@ dynamic = ["version"] dependencies = [ 'anndata >= 0.8.0, < 0.11.0', - 'hdf5plugin >= 5.0.0', "numpy>=1.16", "pandas", "pyarrow",