Skip to content
Snippets Groups Projects
Commit 5c212bfc authored by Baptiste Bauvin's avatar Baptiste Bauvin
Browse files

Support numpy bytes

parent f6cafc7b
No related branches found
No related tags found
No related merge requests found
Pipeline #11486 failed
......@@ -503,7 +503,7 @@ class HDF5Dataset(Dataset):
seleted labels' names
"""
selected_labels = self.get_labels(sample_indices)
if type(self.dataset["Labels"].attrs["names"][0]) == bytes:
if type(self.dataset["Labels"].attrs["names"][0]) in [bytes, np.bytes_]:
return [label_name.decode("utf-8")
for label, label_name in
enumerate(self.dataset["Labels"].attrs["names"])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment