We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88a31ae commit 8fe9103Copy full SHA for 8fe9103
1 file changed
batbot/spectrogram/__init__.py
@@ -1760,9 +1760,15 @@ def compute_wrapper(
1760
segments['stft_db'].append(stft_db[:, start + trim_begin : start + trim_end])
1761
segment_waveplot = waveplot[:, start + trim_begin : start + trim_end]
1762
segments['waveplot'].append(segment_waveplot)
1763
- # convert to JSON serializable datatype and add to metadata if segment_waves is True
1764
if segment_waves:
1765
segment_waveplot = waveform_ms[:, start + trim_begin : start + trim_end]
+ # convert into some JSON serializable
1766
+ segment_waveplot = [
1767
+ [
1768
+ round(float(val), 3) for val in row
1769
+ ]
1770
+ for row in segment_waveplot
1771
1772
metadata_waveplot = {
1773
"waveplot": segment_waveplot,
1774
}
0 commit comments