mmcauliffe / Conch-sounds

This package contains functions for converting wav files into auditory representations and comparing them
MIT License
54 stars 11 forks source link

Numpy deprecation of np.asscalar() #12

Closed maximoskp closed 1 month ago

maximoskp commented 1 year ago

Hi - thanks for your great contributions :)

There appears to be a deprecation error from numpy in

conch/analysis/formants/lpc.py

(could be in other places as well?).

It works for me if I substitute line 240:

formants.append((np.asscalar(f), np.asscalar(bw[j])))

with

formants.append((f.item(), bw[j].item()))