Skip to content

Commit

Permalink
minor bug fix to ensure slicing with integers
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed Jan 28, 2019
1 parent 0822c13 commit 75a148e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions straditize/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -1375,10 +1375,10 @@ def _filter_lines(self, locs, min_lw=1, max_lw=None):
except ValueError: # probably none of the lines is thick enough
if all(len(indices) < min_lw for indices in np.split(
locs, np.where(np.diff(locs) != 1)[0]+1)):
return np.array([])
selection = np.array([], dtype=int)
else:
raise
return selection
return np.asarray(selection, dtype=int)

def recognize_xaxes(self, fraction=0.3, min_lw=1, max_lw=None,
remove=False, **kwargs):
Expand Down

0 comments on commit 75a148e

Please sign in to comment.