Of course
Also, could I request a function that works on a batch if 1D signals…
I wrote something but couldnt paralleize the last part
    peak_mask = torch.cat([torch.zeros((a.shape[0],1), dtype=torch.uint8).bool(), (a[:, :-2]<a[:, 1:-1]) & (a[:, 2:]<a[:, 1:-1]), torch.zeros((a.shape[0],1), dtype=torch.uint8).bool()], dim=1)
    #peak_mask = peak_mask & (a[:] > 0.1)
    b = torch.nn.functional.max_pool1d_with_indices(a.unsqueeze(1), width, 1, padding=width//2)[1].squeeze(1)

    sets = []
    for i in range(0, a.shape[0]):
        bi = b[i,:].unique()
        bi = bi[peak_mask[i,bi].nonzero()]
        #sets.append(bi.flatten().tolist())
        sets.append(bi)