def rvon_mises(mu, kappa, size=None):
    """
    Random von Mises variates.
    """
    # TODO: Just return straight from numpy after release 1.3
    return (np.random.mtrand.vonmises(
        mu, kappa, size) + np.pi) % (2. * np.pi) - np.pi