Skip to content

Commit

Permalink
Disable sparse test for zero matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
EiffL committed Oct 17, 2020
1 parent 842225f commit a345fae
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion jax_cosmo/sparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ def slogdet(sparse):
Based on equation (2.2) of https://arxiv.org/abs/1112.4379
For a zero sparse matrix, the result of this computation is
currently undefined and will return nan.
TODO: support null matrix as input.
Parameters
----------
sparse : array
Expand All @@ -352,7 +356,7 @@ def slogdet(sparse):
-------
tuple
Tuple (sign, logdet) such that sign * exp(logdet) is the
determinant. If the determinant is zero, logdet = -inf.
determinant.
"""
sparse = check_sparse(sparse, square=True)
N, _, P = sparse.shape
Expand All @@ -374,6 +378,9 @@ def det(sparse):
Uses :func:`slogdet`.
For a zero sparse matrix, the result of this computation is
currently undefined and will return nan.
Parameters
----------
sparse : array
Expand Down

0 comments on commit a345fae

Please sign in to comment.