title: Alternative to np.arange or np.linspace with non-uniform intervals
body: <p>I can get a uniform grid on <code>[0,2*pi)</code> with numpy's function <code>np.arange()</code>, however, I would want a grid with the same number of points but having more density of points on certain interval, i.e having a finer grid on<code> [pi,1.5*pi]</code> for example. How can I achieve this, is there a numpy function that accepts a density function and it's output is the grid with that density?</p>