Hi,
this code generate 4 values with gaussian distribution (mu=5, sigma=1):
import numpy as np
x = np.random.normal(5, 1, 4)
print(x)
Output:
[5.87879753 3.29162433 3.83024698 4.92997148]
I would like to round the output like this:
[6, 3, 4, 5]
What should I add to the code?
Thank you
j.
Il Thu, 24 Jun 2021 18:07:07 +0200, Julio Di Egidio ha scritto:
> On 24/06/2021 16:23, jo wrote:
>> Hi,
>>
>> this code generate 4 values with gaussian distribution (mu=5, sigma=1):
>>
>> import numpy as np x = np.random.normal(5, 1, 4)
>> print(x)
>>
>> Output:
>> [5.87879753 3.29162433 3.8302