Inverse of normal cumulative density function.

def invcdf(x):
    """Inverse of normal cumulative density function."""
    x_flat = np.ravel(x)
    x_trans = np.array([flib.ppnd16(y, 1) for y in x_flat])
    return np.reshape(x_trans, np.shape(x))