Release adding on-disk persistence for 3-D sparse .X/layers, following the binsparse specification.
Added
- {func}
~ehrdata.io.write_h5ed/{func}~ehrdata.io.read_h5edand {func}~ehrdata.io.write_zarr/{func}~ehrdata.io.read_zarrcan now persist a 3D.X/layer stored as a pydatasparse.COOtensor. Following closely the binsparse specification (per-axisindices_<dim>+valuesdatasets, afill_value, and a JSONbinsparsedescriptor). The descriptor labels dtypes with binsparse's canonical data-type strings; boolean tensors round-trip asbint8(stored on disk asuint8). Supported specifically for the reserved 3DX/layer slots; asparse.COOin any other slot raises a clear error. (#276) @eroell
Fixed
- {func}
~ehrdata.harmonize_missing_valuesand the read-time float casting no longer choke on boolean arrays. Boolean arrays are now treated like numeric ones (nothing to harmonize/cast). (#264) @eroell - {func}
~ehrdata.move_to_obsnow reads values from the requestedlayerinstead of always reading.X; passinglayer=previously validated the layer but silently moved.X's values. (#279) @eroell - {func}
~ehrdata.integrations.vitessce.gen_default_configno longer fails withX must be 2-dimensionalwhen the time series lives in a 3D.X(e.g. from {func}~ehrdata.dt.physionet2019); the selected source is reduced to the chosentimestepbefore writing, andlayernow defaults toNone(use.X). (#271) @eroell - {func}
~ehrdata.infer_feature_typesbinary detection contained a latent bug: the integrality guard usednp.all(<generator>), which is always truthy and so never actually ran. The check is now the equivalent, correctset(col.unique()) == {0, 1}. No user-visible behaviour changes, as the disabled guard was redundant with the{0, 1}set check. (#268) @Zethson - {func}
~ehrdata.infer_feature_typesno longer emits a warning with a blank feature name (Feature was detected as categorical features stored numerically.) when no feature is uncertain. The warning is now only shown when at least one feature was detected as categorical stored numerically, and lists the affected feature names. (#267) @Zethson - Slicing a 3D {attr}
~ehrdata.EHRData.Xalong the time axis now also slices.X. Previously, subsetting the third axis updated.shapeand.tembut returned the parent's full-length.X, soedata[:, :, idx].X.shapedisagreed withedata[:, :, idx].shape..Xnow applies the time-axis index exactly like a 3D layer. (#259) @eroell
Documentation
- The {class}
~ehrdata.EHRDataattribute reference now describes.obsm,.varm,.obspand.varpin anndata's terms instead of showing a generic placeholder. (#263) @eroell - Updated logo with 3D
.X. Tutorials updated to use.Xcanonically. Docstring examples no longer passlayer="tem_data": the time series is kept in the default 3D.X. (#273) @eroell