Skip to content

Commit

Permalink
fix bug in get_image_as_array, thanks @obernardoff
Browse files Browse the repository at this point in the history
  • Loading branch information
nkarasiak committed Jul 13, 2020
1 parent bd2f839 commit e788b81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions museotoolbox/processing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,9 +1036,9 @@ def get_image_as_array(self):

if self.return_3d is False:
if len(self.opened_images) == 1:
arr = arr[~arr.mask].data
arr = arr[~arr.mask[:,0],...].data
else:
arr = [tmp_arr[~tmp_arr.mask].data for tmp_arr in arr]
arr = [tmp_arr[~arr.mask[:,0],...].data for tmp_arr in arr]
if len(self.opened_images) > 1:
arr = [self.reshape_ndim(tmp_arr) for tmp_arr in arr]
else:
Expand Down

0 comments on commit e788b81

Please sign in to comment.