Skip to content

Commit

Permalink
compression algorithm except deflate doesn't work with strings
Browse files Browse the repository at this point in the history
  • Loading branch information
kaizhang committed Dec 15, 2024
1 parent 5090d95 commit 35ae82b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion anndata-hdf5/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ fn new_dataset<T: BackendData>(
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
Expand Down
1 change: 0 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ dynamic = ["version"]

dependencies = [
'anndata >= 0.8.0, < 0.11.0',
'hdf5plugin >= 5.0.0',
"numpy>=1.16",
"pandas",
"pyarrow",
Expand Down

0 comments on commit 35ae82b

Please sign in to comment.