Skip to content

Commit 88a31ae

Browse files
committed
output array
1 parent d74a205 commit 88a31ae

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

batbot/spectrogram/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,12 @@ def get_waveform_data_ms(waveform, sample_rate, hop_length=16):
259259
# (samples / sample_rate) = seconds
260260
# (seconds * 1000) = milliseconds
261261
times_ms = (np.arange(len(bin_mins)) * hop_length) / sample_rate * 1000
262-
263-
return times_ms, bin_mins, bin_maxs
262+
# convert into an array
263+
times_ms = np.around(times_ms).astype(float)
264+
bin_mins = np.around(bin_mins).astype(float)
265+
bin_maxs = np.around(bin_maxs).astype(float)
266+
output_array = np.stack((times_ms, bin_mins, bin_maxs), axis=-1)
267+
return output_array
264268

265269

266270
# @lp

0 commit comments

Comments
 (0)