Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lock native float16 dtype only if available #2422

Merged
merged 1 commit into from
Jun 1, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions h5py/api_types_hdf5.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,8 @@ cdef extern from "hdf5.h":

# === H5I - Identifier and reflection interface ===============================

int H5I_INVALID_HID

IF HDF5_VERSION < VOL_MIN_HDF5_VERSION:
ctypedef enum H5I_type_t:
H5I_UNINIT = -2, # uninitialized Group
Expand Down
1 change: 1 addition & 0 deletions h5py/h5i.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ from ._objects import phil, with_phil

# === Public constants and data structures ====================================

INVALID_HID = H5I_INVALID_HID
BADID = H5I_BADID
FILE = H5I_FILE
GROUP = H5I_GROUP
Expand Down
5 changes: 4 additions & 1 deletion h5py/h5t.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,10 @@ LDOUBLE_BE.set_order(H5T_ORDER_BE)
LDOUBLE_BE.lock()

IF HDF5_VERSION > (1, 14, 3):
NATIVE_FLOAT16 = lockid(H5T_NATIVE_FLOAT16)
if H5T_NATIVE_FLOAT16 != H5I_INVALID_HID:
NATIVE_FLOAT16 = lockid(H5T_NATIVE_FLOAT16)
else:
NATIVE_FLOAT16 = H5I_INVALID_HID

# Unix time types
UNIX_D32LE = lockid(H5T_UNIX_D32LE)
Expand Down