dimanche 15 décembre 2019

Put constraits on six random numbers making three negative and three positive and equating to 1?

How do i make three random negative numbers and three positive random numbers equal 1 constrained between -1 and 1. For example,

         random_nums = np.array([-.2,-.3,-.5,.5,.8,.7])) = 1

I dont want np.uniform answers I need 6 random numbers in arr[0],arr[1],arr[2],arr[3],arr[4],arr[5],arr[6] =1. Then want to shuffle them in different order shuffle(random_nums).




Aucun commentaire:

Enregistrer un commentaire