Skip to content

Commit

Permalink
Replace deprecated boolean subtraction operator
Browse files Browse the repository at this point in the history
Fixes #109 by changing deprecated boolean subtraction operator ( minus sign, '-' ) to '^'.
  • Loading branch information
WillPastor committed Apr 23, 2019
1 parent 7f53f2a commit 0234591
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dejavu/fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ def get_2D_peaks(arr2D, plot=False, amp_min=DEFAULT_AMP_MIN):
eroded_background = binary_erosion(background, structure=neighborhood,
border_value=1)

# Boolean mask of arr2D with True at peaks
detected_peaks = local_max - eroded_background
# Boolean mask of arr2D with True at peaks (Fixed deprecated boolean operator by changing '-' to '^')
detected_peaks = local_max ^ eroded_background

# extract peaks
amps = arr2D[detected_peaks]
Expand Down

0 comments on commit 0234591

Please sign in to comment.