From 02345911ca6f3180800fc3075040fbeaa4bf55e0 Mon Sep 17 00:00:00 2001 From: William P Date: Tue, 23 Apr 2019 11:52:00 -0400 Subject: [PATCH] Replace deprecated boolean subtraction operator Fixes #109 by changing deprecated boolean subtraction operator ( minus sign, '-' ) to '^'. --- dejavu/fingerprint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dejavu/fingerprint.py b/dejavu/fingerprint.py index 4db321b..f80be26 100755 --- a/dejavu/fingerprint.py +++ b/dejavu/fingerprint.py @@ -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]