def standard_to_natural(S, m, kappa, nu): b = np.expand_dims(kappa, -1) * m A = S + outer(b, m) return pack_dense(A, b, kappa, nu)
def natural_to_standard(natparam): A, b, kappa, nu = unpack_dense(natparam) m = b / np.expand_dims(kappa, -1) S = A - outer(b, m) return S, m, kappa, nu