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

fix(writer): Fringe case uncovered, all cells new

parent 1e980101
No related branches found
No related tags found
No related merge requests found
...@@ -703,10 +703,15 @@ class Writer(BridgeH5): ...@@ -703,10 +703,15 @@ class Writer(BridgeH5):
# Add found cells # Add found cells
dset.resize(dset.shape[1] + df.shape[1], axis=1) dset.resize(dset.shape[1] + df.shape[1], axis=1)
dset[:, ntps:] = np.nan dset[:, ntps:] = np.nan
for i, tp in enumerate(df.columns):
dset[ found_indices_sorted = self.id_cache[df.index.nlevels][
self.id_cache[df.index.nlevels]["found_indices"], tp "found_indices"
] = existing_values[:, i] ]
if found_indices_sorted.any():
# h5py does not allow bidimensional indexing,
# so we have to iterate over the columns
for i, tp in enumerate(df.columns):
dset[found_indices_sorted, tp] = existing_values[:, i]
# Add new cells # Add new cells
n_newcells = len( n_newcells = len(
self.id_cache[df.index.nlevels]["additional_multis"] self.id_cache[df.index.nlevels]["additional_multis"]
......
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