Wrapper around h5py to give easier interface around complex files.
Project description
yoki5
Overview
A simple wrapper around h5py to give easier interface around complex HDF5 files.
This library is designed to simplify the process of reading and writing HDF5 files by providing several methods that make it easy to add/remove datasets or groups.
Getting started
import numpy as np
from yoki5.base import Store
from scipy.sparse import csr_matrix
# Create a new HDF5 file
store = Store('path/to/file.h5')
store.add_data_to_group(
"group-1",
{"data": np.random.rand(100, 100)},
{"attribute": "value"},
compression="gzip",
chunks=(10, 10),
)
# Retrieve the array
array = store.get_array("group-1", "data")
# Add sparse matrix
store.add_data_to_group(
"group-2",
csr_matrix(np.random.randint(0, 255, (100, 100))),
{"attribute": "value"},
)
# Retrieve the data
matrix = store.get_sparse_array("group-2")
Contributing
Contributions are always welcome. Please feel free to submit PRs with new features, bug fixes, or documentation improvements.
git clone https://github.com/lukasz-migas/yoki5.git
pip install -e .[dev]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
yoki5-0.1.0.tar.gz
(22.4 kB
view details)
Built Distribution
yoki5-0.1.0-py3-none-any.whl
(16.1 kB
view details)
File details
Details for the file yoki5-0.1.0.tar.gz
.
File metadata
- Download URL: yoki5-0.1.0.tar.gz
- Upload date:
- Size: 22.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f89568c023a458331bb543de40c904c6020797b111af9274be4bc4b995444185 |
|
MD5 | d390226f7eedc5035c00a353e13bd23d |
|
BLAKE2b-256 | 452e3dcf90c9ab8f5201c0514167bee5f4a5267dba715d104cecb50b921085f1 |
File details
Details for the file yoki5-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: yoki5-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfbd2ac9a70a34ff02c7390342af234407360d2c8298baf11c25910b11b6eddc |
|
MD5 | 5d2a8179cb6250ed64902222e2e1fbb5 |
|
BLAKE2b-256 | c5c33ba61792b5119bd5e3c37d95fc765c0148b5aefb8cdaea69b19e1ec49f20 |