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.

Asked By: M.Ramana

||

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)
Answered By: Minh-Long Luu
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.