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

Labels selection

parent 5d572966
Branches
Tags
No related merge requests found
...@@ -292,7 +292,7 @@ class Dataset(): ...@@ -292,7 +292,7 @@ class Dataset():
self.dataset.copy("Metadata", new_dataset_file) self.dataset.copy("Metadata", new_dataset_file)
if "example_ids" in self.dataset["Metadata"].keys(): if "example_ids" in self.dataset["Metadata"].keys():
ex_ids = new_dataset_file["Metadata"]["example_ids"] ex_ids = new_dataset_file["Metadata"]["example_ids"]
ex_ids = np.array([self.example_ids[example_indices]]).astype(np.dtype("S10")) ex_ids[...] = np.array(self.example_ids)[example_indices].astype(np.dtype("S10"))
else: else:
new_dataset_file["Metadata"].create_dataset("example_ids", new_dataset_file["Metadata"].create_dataset("example_ids",
(len(self.example_ids), ), (len(self.example_ids), ),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment