samedi 19 juin 2021

Random numbers, small decimals

I'm working with random numbers in python, the problem is the following; I have a variable, we can call it "x", I want it to take values between [10^-6,10^-1], then I have the following line

x=np.random.uniform[1e-6,1e-1]

But it is only generating numbers like

0.123123  0.524234   0.0453454  0.9083405

It never generates numbers like

0.0002342  0.00002434  0.313123  0.000004234  0.034234

How can I generate the second type of random numbers? Generating random numbers of magnitudes 1e-1,1e-2,1e-3,1e-4,1e-5,1e-6?




Aucun commentaire:

Enregistrer un commentaire