I am currently using the numpy.random.uniform
function to generate random decimals within a certain range.
x = np.random.uniform(-5, 5, (1, 2))
However, I want to add a probability for a certain random value to occur. I know the np.random.choice
function has it, but I want to produce decimals, not whole numbers. Is there a way to generate random decimals and give them probabilities?
Aucun commentaire:
Enregistrer un commentaire