Skip to content

Commit

Permalink
Exclude Normal distributions with operator mean and dense covariance
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinpfoertner committed Aug 24, 2020
1 parent 0c9ffb1 commit 8bdeb76
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/probnum/core/random_variables/_normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ def __init__(
# Method selection
univariate = len(mean.shape) == 0
dense = isinstance(mean, np.ndarray) and isinstance(cov, np.ndarray)
operator = isinstance(mean, linops.LinearOperator) or isinstance(
cov, linops.LinearOperator
)
operator = isinstance(cov, linops.LinearOperator)

if univariate:
# Univariate Gaussian
Expand Down Expand Up @@ -563,12 +561,7 @@ def _operatorvariate_params_todense(self):
else:
mean = self._mean

if isinstance(self._cov, linops.LinearOperator):
cov = self._cov.todense()
else:
cov = self._cov

return mean, cov
return mean, self._cov.todense()

def _operatorvariate_sample(self, size=()) -> np.ndarray:
mean, cov = self._operatorvariate_params_todense()
Expand Down

0 comments on commit 8bdeb76

Please sign in to comment.