I'll start by creating PDF curves for reference:
NUM_SAMPLES = 100000 SKEW_PARAMS = [-3, 0] def skew_norm_pdf(x,e=0,w=1,a=0):

Next, I found a VB implementation of random numbers of a sample from the normal distribution of oblique and converted it to python:
# literal adaption from: # http:

And then he wrote a quick version that (without extensive testing) looks right:
def randn_skew_fast(N, alpha=0.0, loc=0.0, scale=1.0): sigma = alpha / np.sqrt(1.0 + alpha**2) u0 = np.random.randn(N) v = np.random.randn(N) u1 = (sigma*u0 + np.sqrt(1.0 - sigma**2)*v) * scale u1[u0 < 0] *= -1 u1 = u1 + loc return u1

source share