What’s new in h5py 3.3¶
New features¶
Compatibility with the upcoming HDF5 1.12.1 and possibly 1.14 (PR 1875).
H5T_BITFIELD types will now be cast to their
numpy.uint
equivalent by default (GH1258). This means that no knowledge of mixed type compound dataset schemas is required to read these types, and can simply be read as follows:arr = dset[:]
Alternatively, 8-bit bitfields can still be cast to booleans explicitly:
arr = dset.astype(numpy.bool_)[:]
Key types are validated when accessing groups, to give more helpful errors when a group is indexed like a dataset (PR 1856).
A new
Group.build_virtual_dataset()
method acting as a context manager to assemble virtual datasets (PR 1905).If the source and target of a virtual dataset mapping have different numbers of points, an error should now be thrown when you make the mapping in the
VirtualLayout
, rather than later when writing this into the file. This should make it easier to find the source of such errors.
Deprecations¶
Linux wheels are now manylinux2010 rather than manylinux1
The
default_file_mode
config option is deprecated, and setting it to values other than ‘r’ (for read-only mode) is no longer allowed. Pass the mode when creating aFile
object instead of setting a global default.
Bug fixes¶
Trying to open a file in append mode (
'a'
) should now give clearer error messages when the file exists but can’t be opened (PR 1902).Protect
h5py.h5f.get_obj_ids()
against garbage collection invalidating HDF5 IDs while it is retrieving them (GH1852).Make file closing more robust, including when closing files while the interpreter is shutting down, by using lower-level code to close HDF5 IDs of objects inside the file (GH1495).