Skip to content

Commit 42502bd

Browse files
authored
Update jax.py
1 parent c4f3c1f commit 42502bd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

uncertaintyx/fit/eiv/jax.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def evm(
5757
max_i: int = DEFAULT_MAX_I,
5858
max_g: Any = DEFAULT_MAX_G,
5959
covar: bool = False,
60-
) -> tuple[Any, ...]:
60+
) -> tuple[Array, Array, Array, Array, bool]:
6161
r"""
6262
Implementation of the effective variance method (EVM) with
6363
a limited-memory Broyden-Fletcher-Goldfarb-Shanno (L-BFGS)
@@ -255,7 +255,7 @@ def post(p: Array) -> tuple[Array, Array]:
255255
popt, cost, converged = opti(p)
256256
pcov, punc = post(popt)
257257

258-
return popt, pcov, punc, cost, converged
258+
return popt, pcov, punc, cost, converged.any()
259259

260260

261261
class EIV(Fitting):
@@ -315,5 +315,5 @@ def fit(
315315
pcov=np.asarray(pcov),
316316
rvar=rvar,
317317
cost=np.asarray(cost),
318-
info=0 if converged.item() else 1,
318+
info=0 if converged else 1,
319319
)

0 commit comments

Comments
 (0)