itspoma / audio-fingerprint-identifying-python

The Shazam-similar app, that identify the song using audio fingerprints & spectrum analysis and Fast Fourier transform
MIT License
351 stars 164 forks source link

TypeError: numpy boolean subtract, the `-` operator, is deprecated #8

Closed Naereen closed 6 years ago

Naereen commented 6 years ago
Traceback (most recent call last):
  File "collect-fingerprints-of-songs.py", line 53, in <module>
    channel_hashes = fingerprint.fingerprint(channel, Fs=audio['Fs'], plots=config['fingerprint.show_plots'])
  File "audio-fingerprint-identifying-python/libs/fingerprint.py", line 95, in fingerprint
    local_maxima = get_2D_peaks(arr2D, plot=plots, amp_min=amp_min)
  File "audio-fingerprint-identifying-python/libs/fingerprint.py", line 115, in get_2D_peaks
    detected_peaks = local_max - eroded_background
TypeError: numpy boolean subtract, the `-` operator, is deprecated, use the bitwise_xor, the `^` operator, or the logic al_xor function instead.

With most up-to date numpy on Python 2.

Naereen commented 6 years ago

https://github.com/itspoma/audio-fingerprint-identifying-python/blob/master/libs/fingerprint.py#L115