Skip to content

Commit d783e40

Browse files
Merge pull request #1021 from visserle/patch-1
[Fix] Prevent `sparseda` method from raising `AttributeError`
2 parents b99036c + 124dc04 commit d783e40

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

neurokit2/eda/eda_phasic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def lasso(R, s, sampling_rate, maxIters, epsilon):
584584
)
585585
ATv = np.matmul(R.transpose(), v).flatten()
586586

587-
gammaI = np.Inf
587+
gammaI = np.inf
588588
removeIndices = []
589589

590590
inactiveSet = np.arange(0, W)
@@ -603,7 +603,7 @@ def lasso(R, s, sampling_rate, maxIters, epsilon):
603603
epsilon = 1e-12
604604
gammaArr = (lmbda - c[inactiveSet]) / (1 - ATv[inactiveSet] + epsilon)
605605

606-
gammaArr[gammaArr < zeroTol] = np.Inf
606+
gammaArr[gammaArr < zeroTol] = np.inf
607607
gammaIc = np.min(gammaArr)
608608
# Imin = np.argmin(gammaArr)
609609
newIndices = inactiveSet[(np.abs(gammaArr - gammaIc) < zeroTol)]

0 commit comments

Comments
 (0)