def _vmf_log(X, kappa, mu):
    """Computs log(vMF(X, kappa, mu)) using built-in numpy/scipy Bessel
    approximations.

    Works well on small kappa and mu.
    """
    n_examples, n_features = X.shape
    return np.log(_vmf_normalize(kappa, n_features) * np.exp(kappa * X.dot(mu).T))
def _vmf_log ( X , kappa , mu ) : n_examples , n_features = X . shape return np . log ( _vmf_normalize ( kappa , n_features ) * np . exp ( kappa * X . dot ( mu ) . T ) )
Computs log(vMF(X, kappa, mu)) using built-in numpy/scipy Bessel
    approximations.

    Works well on small kappa and mu.