offsetBiasSample = [randint(-10,10)/100 for i in range(10)] offsetBias = choice(offsetBiasSample) index_offsetBias = randint(0,len(oldBiases)-1) oldBiases[index_offsetBias] = oldBiases[index_offsetBias] + offsetBias