-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
bugSomething isn't workingSomething isn't working
Description
The test test_fitting_dummy_doubleExp() sometimes fails when running the GitHub Actions with the warning:
=================================== FAILURES ===================================
_________________________ test_fitting_dummy_doubleExp _________________________
def test_fitting_dummy_doubleExp():
tau1 = 10.0
tau2 = 200.0
frac = 0.3
s1 = 1.2
s2 = 1.1
tData = np.linspace(0.0, 10.0 * np.max([tau1, tau2]), 1000)
isfData = frac * np.exp(-1.0 * (tData / tau1) ** s1) + (1.0 - frac) * np.exp(
-1.0 * (tData / tau2) ** s2
)
isfData += np.random.normal(0.0, isfData / 1000.0, 1000)
popt, pcov = genFit(isfData, tData, "doubleExp")
> assert (
np.abs(popt - [tau1, tau2, frac, s1, s2])
< [tau1 / 100.0, tau2 / 100.0, frac / 100.0, s1 / 100.0, s2 / 100.0]
).all() or (
np.abs(popt - [tau2, tau1, 1.0 - frac, s2, s1])
< [tau2 / 100.0, tau1 / 100.0, (1 - frac) / 100.0, s2 / 100.0, s1 / 100.0]
).all()
E AssertionError: assert (False or False)
E + where False = <built-in method all of numpy.ndarray object at 0x7f894a70bf90>()
E + where <built-in method all of numpy.ndarray object at 0x7f894a70bf90> = array([0.04706137, 0.26052525, 0.00089177, 0.01552927, 0.00121585]) < [0.1, 2.0, 0.003, 0.012, 0.011000000000000001].all
E + where array([0.04706137, 0.26052525, 0.00089177, 0.01552927, 0.00121585]) = <ufunc 'absolute'>((array([ 10.04706137, 200.26052525, 0.30089177, 1.[18](https://github.com/koenderinklab/OpenDDM/actions/runs/3046530233/jobs/4909451717#step:6:19)447073,\n 1.10121585]) - [10.0, [20](https://github.com/koenderinklab/OpenDDM/actions/runs/3046530233/jobs/4909451717#step:6:21)0.0, 0.3, 1.2, 1.1]))
E + where <ufunc 'absolute'> = np.abs
E + and False = <built-in method all of numpy.ndarray object at 0x7f894a7244b0>()
E + where <built-in method all of numpy.ndarray object at 0x7f894a7244b0> = array([1.89952939e+02, 1.90260525e+02, 3.99108226e-01, 8.44707329e-02,\n 9.87841464e-02]) < [2.0, 0.1, 0.006999999999999999, 0.011000000000000001, 0.012].all
E + where array([1.89952939e+02, 1.90260525e+02, 3.99108226e-01, 8.44707329e-02,\n 9.87841464e-02]) = <ufunc 'absolute'>((array([ 10.04706137, 200.26052525, 0.30089177, 1.18447073,\n 1.101[21](https://github.com/koenderinklab/OpenDDM/actions/runs/3046530233/jobs/4909451717#step:6:22)585]) - [200.0, 10.0, 0.7, 1.1, 1.2]))
E + where <ufunc 'absolute'> = np.abs
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working