Skip to content
Snippets Groups Projects
Commit 3b0c27fc authored by Alán Muñoz's avatar Alán Muñoz
Browse files

fix(writer): only create dset when nonexistent

parent b16333f2
No related branches found
No related tags found
No related merge requests found
...@@ -570,14 +570,15 @@ class Writer(BridgeH5): ...@@ -570,14 +570,15 @@ class Writer(BridgeH5):
# create dataset and write time points as columns # create dataset and write time points as columns
tp_path = path + "/timepoint" tp_path = path + "/timepoint"
f.create_dataset( if tp_path not in f:
name=tp_path, f.create_dataset(
shape=(df.shape[1],), name=tp_path,
maxshape=(max_tps,), shape=(df.shape[1],),
dtype="uint16", maxshape=(max_tps,),
) dtype="uint16",
tps = list(range(df.shape[1])) )
f[tp_path][tps] = tps tps = list(range(df.shape[1]))
f[tp_path][tps] = tps
else: else:
f[path].attrs["columns"] = df.columns.tolist() f[path].attrs["columns"] = df.columns.tolist()
else: else:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment