Skip to content

Commit 610e429

Browse files
committed
Fix sign bug in _PositiveDefiniteCirculantVector validity check.
1 parent e245e7a commit 610e429

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpyro/distributions/constraints.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ def __call__(self, x):
650650
jnp = np if isinstance(x, (np.ndarray, np.generic)) else jax.numpy
651651
tol = 10 * jnp.finfo(x.dtype).eps
652652
rfft = jnp.fft.rfft(x)
653-
return (jnp.abs(rfft.imag) < tol) & (rfft.real > tol)
653+
return (jnp.abs(rfft.imag) < tol) & (rfft.real > -tol)
654654

655655
def feasible_like(self, prototype):
656656
return jnp.zeros_like(prototype).at[..., 0].set(1.0)

0 commit comments

Comments
 (0)