Skip to content

test_wishart_log_prob fails locally for me #76160

@ezyang

Description

@ezyang

🐛 Describe the bug

======================================================================
ERROR: test_wishart_log_prob (__main__.TestDistributions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/users/ezyang/pytorch-tmp/test/distributions/test_distributions.py", line 2309, in test_wishart_log_prob
    expected = ref_dist.logpdf(x.transpose(0, 2).numpy())
  File "/home/ezyang/local/pytorch-tmp-env/lib/python3.9/site-packages/scipy/stats/_multivariate.py", line 2258, in logpdf
    out = self._dist._logpdf(x, self.dim, self.df, self.scale,
  File "/home/ezyang/local/pytorch-tmp-env/lib/python3.9/site-packages/scipy/stats/_multivariate.py", line 1851, in _logpdf
    _, log_det_x[i] = self._cholesky_logdet(x[:, :, i])
  File "/home/ezyang/local/pytorch-tmp-env/lib/python3.9/site-packages/scipy/stats/_multivariate.py", line 2221, in _cholesky_logdet
    c_decomp = scipy.linalg.cholesky(scale, lower=True)
  File "/home/ezyang/local/pytorch-tmp-env/lib/python3.9/site-packages/scipy/linalg/_decomp_cholesky.py", line 88, in cholesky
    c, lower = _cholesky(a, lower=lower, overwrite_a=overwrite_a, clean=True,
  File "/home/ezyang/local/pytorch-tmp-env/lib/python3.9/site-packages/scipy/linalg/_decomp_cholesky.py", line 37, in _cholesky
    raise LinAlgError("%d-th leading minor of the array is not positive "
numpy.linalg.LinAlgError: 3-th leading minor of the array is not positive definite

----------------------------------------------------------------------

I have scipy 1.8.0 installed

Versions

master

cc @fritzo @neerajprad @alicanb @nikitaved @mruberry @jianyuh @pearu @walterddr @IvanYashchuk @xwang233 @lezcano

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: distributionsRelated to torch.distributionsmodule: testsIssues related to tests (not the torch.testing module)triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions