// Sampling from empty neighbourhood
return [None] * size
// Sample with replacement
return [rs.choice(neighbours) for _ in range(size)]
def _check_neighbourhood_sizes(self, in_size, out_size):
Checks that the parameter values are valid or raises ValueError exceptions with a message indicating the
After Change
// Sampling from empty neighbourhood
return [None] * size
// Sample with replacement
return rs.choices(neighbours, k=size)
def _check_neighbourhood_sizes(self, in_size, out_size):
Checks that the parameter values are valid or raises ValueError exceptions with a message indicating the