Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/changes/newsfragments/444.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Allow ``timeseries_2d`` storage for :class:`.HDF5FeatureStorage` by `Fede Raimondo`_
16 changes: 14 additions & 2 deletions junifer/storage/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,13 @@ def __init__(
uri.parent.mkdir(parents=True, exist_ok=True)

# Available storage kinds
storage_types = ["vector", "timeseries", "matrix", "scalar_table"]
storage_types = [
"vector",
"timeseries",
"matrix",
"scalar_table",
"timeseries_2d",
]

super().__init__(
uri=uri,
Expand All @@ -180,7 +186,13 @@ def get_valid_inputs(self) -> list[str]:
storage.

"""
return ["matrix", "vector", "timeseries", "scalar_table"]
return [
"matrix",
"vector",
"timeseries",
"scalar_table",
"timeseries_2d",
]

def _fetch_correct_uri_for_io(self, element: Optional[dict]) -> str:
"""Return proper URI for I/O based on `element`.
Expand Down
1 change: 1 addition & 0 deletions junifer/storage/tests/test_hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def test_get_valid_inputs() -> None:
"vector",
"timeseries",
"scalar_table",
"timeseries_2d",
]


Expand Down
Loading