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

fix(vis_tool): concat_dims supports negative index

parent dee7bb36
No related branches found
No related tags found
No related merge requests found
...@@ -63,7 +63,8 @@ def get_cellmasks_at_times(results_path: str, timepoints: t.List[int] = [0]): ...@@ -63,7 +63,8 @@ def get_cellmasks_at_times(results_path: str, timepoints: t.List[int] = [0]):
def concatenate_dims(ndarray, axis1: int, axis2: int): def concatenate_dims(ndarray, axis1: int, axis2: int):
return np.concatenate(np.moveaxis(ndarray, axis1, 0), axis=axis2) axis2 = len(ndarray.shape) + axis2 if axis2 < 0 else axis2
return np.concatenate(np.moveaxis(ndarray, axis1, 0), axis=axis2 - 1)
def get_tile_mask_pairs( def get_tile_mask_pairs(
......
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