'initialize instance
Parameters
mean : array_like
parameter mu (might be renamed), for symmetric distributions this
is the mean
sigma : array_like, 2d
dispersion matrix, covariance matrix in normal distribution, but
only proportional to covariance matrix in t distribution
args : list
distribution specific arguments, e.g. df for t distribution
kwds : dict
currently not used'

def __init__(self, mean, sigma, *args, **kwds):

    self.extra_args = []
    self.mean = np.asarray(mean)
    self.sigma = sigma = np.asarray(sigma)
    sigma = np.squeeze(sigma)
    self.nvars = nvars = len(mean)
    if (sigma.shape == ()):
        self.sigma = (np.eye(nvars) * sigma)
        self.sigmainv = (np.eye(nvars) / sigma)
        self.cholsigmainv = (np.eye(nvars) / np.sqrt(sigma))
    elif ((sigma.ndim == 1) and (len(sigma) == nvars)):
        self.sigma = np.diag(sigma)
        self.sigmainv = np.diag((1.0 / sigma))
        self.cholsigmainv = np.diag((1.0 / np.sqrt(sigma)))
    elif (sigma.shape == (nvars, nvars)):
        self.sigmainv = np.linalg.pinv(sigma)
        self.cholsigmainv = np.linalg.cholesky(self.sigmainv).T
    else:
        raise ValueError('sigma    has    invalid    shape')
    self.logdetsigma = np.log(np.linalg.det(self.sigma))
