def get_partition_lengths(partitions):
    """
    Takes an array of partitions and returns and array with their lenghts.
    Parameters
    ----------
    partitions: array
        Array containing the partitions.
    Returns
    -------
    array
        Array containing partition lengths.
    """
    return [len(p) for p in partitions]