Fix standardize trim_table argument
Small fix on the standardize method. Currently, standardize with trim_table=True
wont work without the mapper
argument set. This merge request fixes this issue.
You can test this bug with the following code (it will throw an error without this branch):
import pandas as pd
from ketos.data_handling import selection_table as sl
annot = pd.DataFrame([{"filename":"sample_audio.wav", "start":2.0, "end":3.0, "label":"A", "duration":1, "offset":50},
{"filename":"sample_audio.wav", "start":5.0, "end":6.0, "label":"A", "duration":1, "offset":50},
{"filename":"sample_audio.wav", "start":21.0, "end":22.0, "label":"A", "duration":1, "offset":50},
{"filename":"sample_audio.wav", "start":25.0, "end":27.0, "label":"A", "duration":1, "offset":50}])
annot_std = sl.standardize(table=annot, labels=["A"], trim_table=True, start_labels_at_1=True)
annot_std