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):
# create dataset and write time points as columns
tp_path = path + "/timepoint"
f.create_dataset(
name=tp_path,
shape=(df.shape[1],),
maxshape=(max_tps,),
dtype="uint16",
)
tps = list(range(df.shape[1]))
f[tp_path][tps] = tps
if tp_path not in f:
f.create_dataset(
name=tp_path,
shape=(df.shape[1],),
maxshape=(max_tps,),
dtype="uint16",
)
tps = list(range(df.shape[1]))
f[tp_path][tps] = tps
else:
f[path].attrs["columns"] = df.columns.tolist()
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