h5py
Python interface for reading and writing HDF5 files.
Our View
h5py gives Python users direct access to hierarchical HDF5 datasets, including partial reads and structured metadata, which are important for large scientific data files.
Provisional positions are editorial proposals awaiting group review.
Teaching — Recorded in topic offerings; consult the dated event links for availability.
2 topics with recorded teaching · 1 past offerings · 1 upcoming offerings
Related themes: Neural Data AnalysisScientific Computing
Related topics: Arrays and Numerical ComputingCalcium Imaging AnalysisDataframes and StatisticsRobust and Reusable Software
Common use cases
- Read and write HDF5 datasets from Python
- Load only selected slices of large arrays
- Inspect structured scientific files and metadata
Getting started
h5py is a Python library for working with HDF5 files. It exposes groups, datasets, attributes, and partial reads in a way that fits naturally with NumPy arrays.
Why It Matters in Research Workflows
Many scientific file formats are built on HDF5 or use similar hierarchical ideas. Understanding h5py helps researchers inspect files, avoid loading more data than necessary, and make informed choices about chunking, compression, and metadata.
In Our Teaching
We use h5py in high-performance Python materials to show how file layout affects memory use and I/O performance. See the lesson on structured scientific data with HDF5.