Skip to content

Commit

Permalink
Set allow_singular=True for multivariate_normal's pdf (#375)
Browse files Browse the repository at this point in the history
  • Loading branch information
fealho committed Feb 22, 2024
1 parent ceebde9 commit ddc6889
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion copulas/multivariate/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ def probability_density(self, X):
"""
self.check_fit()
transformed = self._transform_to_normal(X)
return stats.multivariate_normal.pdf(transformed, cov=self.correlation)

return stats.multivariate_normal.pdf(
transformed, cov=self.correlation, allow_singular=True)

def cumulative_distribution(self, X):
"""Compute the cumulative distribution value for each point in X.
Expand Down

0 comments on commit ddc6889

Please sign in to comment.