Creating arguments which are evenly distributed in $[0,pi)$
Question:
I want to create arguments ${ psi_{m}}$ which are evenly distributed in $[0,pi)$ in python where $m=1,…,M$ with $M=100$. I would be appreciate if someone could help me that. Thanks in advance.
Answers:
If I understand correctly, you want to sample 100 numbers that are evenly distributed in the range [0, pi)
, then you can use:
import numpy as np
np.random.uniform(0.0, np.pi, size=100)
I want to create arguments ${ psi_{m}}$ which are evenly distributed in $[0,pi)$ in python where $m=1,…,M$ with $M=100$. I would be appreciate if someone could help me that. Thanks in advance.
If I understand correctly, you want to sample 100 numbers that are evenly distributed in the range [0, pi)
, then you can use:
import numpy as np
np.random.uniform(0.0, np.pi, size=100)