def _reshape_list_shapelets(shapelets, lengths):
    """Reshape shapelets from a 1D-array to a list of 2D-arrays."""
    shapelets_reshaped = []
    start = 0
    for length in lengths:
        n_shapelets = length.size
        length_ = length[0]
        end = start + n_shapelets * length_
        shapelets_reshaped.append(shapelets[start: end].reshape(-1, length_))
        start = end
    return shapelets_reshaped
Reshape shapelets from a 1D-array to a list of 2D-arrays.
pyts/classification/learning_shapelets.py