import random


def getperm(array, seed):
    """
    Compute permutation of model weights with the provided seed
    :param array: model weights
    :type  array: `numpy.ndarray`
    :param seed: key for permuting model weights
    :type seed: `int`
    :return: list of permuted model weight indexes
    :rtype: `list`
    """

    perm = list(range(len(array)))
    random.Random(seed).shuffle(perm)
    return perm