Skip to content

Commit

Permalink
Fix tupled indices
Browse files Browse the repository at this point in the history
  • Loading branch information
HagaiHargil committed Aug 14, 2019
1 parent 1c036a1 commit 0a832a9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions caiman/source_extraction/cnmf/cnmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@ def fit(self, images, indices=(slice(None), slice(None))):
# Todo : to compartment
if isinstance(indices, slice):
indices = [indices]
if isinstance(indices, tuple):
indices = list(indices)
indices = [slice(None)] + indices
if len(indices) < len(images.shape):
indices = indices + [slice(None)]*(len(images.shape) - len(indices))
Expand Down

0 comments on commit 0a832a9

Please sign in to comment.