Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated boolean subtraction operator #193

Merged
merged 1 commit into from
May 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Replace deprecated boolean subtraction operator
Fixes #109 by changing deprecated boolean subtraction operator ( minus sign, '-' ) to '^'.
  • Loading branch information
WillPastor committed Apr 23, 2019
commit 02345911ca6f3180800fc3075040fbeaa4bf55e0
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