Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

place a number randomly in a list python

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 
Source by note.nkmk.me #
 
PREVIOUS NEXT
Tagged: #place #number #randomly #list #python
ADD COMMENT
Topic
Name
1+5 =