From 94142310b46ba459e4bde375069c831ecbcbd06d Mon Sep 17 00:00:00 2001 From: Marvin Pfoertner Date: Fri, 28 Aug 2020 12:44:58 +0200 Subject: [PATCH] Bugfixes --- tests/test_diffeq/test_odesolver.py | 6 +++--- tests/{test_core => test_random_variables}/__init__.py | 0 tests/{test_core => }/test_random_variables/test_dirac.py | 1 - tests/{test_core => }/test_random_variables/test_normal.py | 0 .../test_random_variables/test_random_variable.py | 0 5 files changed, 3 insertions(+), 4 deletions(-) rename tests/{test_core => test_random_variables}/__init__.py (100%) rename tests/{test_core => }/test_random_variables/test_dirac.py (96%) rename tests/{test_core => }/test_random_variables/test_normal.py (100%) rename tests/{test_core => }/test_random_variables/test_random_variable.py (100%) diff --git a/tests/test_diffeq/test_odesolver.py b/tests/test_diffeq/test_odesolver.py index 237126975b..b69f72d1a3 100644 --- a/tests/test_diffeq/test_odesolver.py +++ b/tests/test_diffeq/test_odesolver.py @@ -3,7 +3,7 @@ import numpy as np from probnum.diffeq import logistic, ODESolver, ConstantSteps -from probnum.prob import RandomVariable, Dirac +from probnum.random_variables import Dirac class MockODESolver(ODESolver): @@ -17,7 +17,7 @@ def step(self, start, stop, current): x = current.mean() xnew = x + h * self.ivp(start, x) return ( - RandomVariable(Dirac(xnew)), + Dirac(xnew), np.nan, ) # return nan as error estimate to ensure that it is not used @@ -29,7 +29,7 @@ class ODESolverTestCase(unittest.TestCase): """ def setUp(self): - y0 = RandomVariable(distribution=Dirac(0.3)) + y0 = Dirac(0.3) ivp = logistic([0, 4], initrv=y0) self.solver = MockODESolver(ivp) self.step = 0.2 diff --git a/tests/test_core/__init__.py b/tests/test_random_variables/__init__.py similarity index 100% rename from tests/test_core/__init__.py rename to tests/test_random_variables/__init__.py diff --git a/tests/test_core/test_random_variables/test_dirac.py b/tests/test_random_variables/test_dirac.py similarity index 96% rename from tests/test_core/test_random_variables/test_dirac.py rename to tests/test_random_variables/test_dirac.py index 51ac994ada..bcc1579797 100644 --- a/tests/test_core/test_random_variables/test_dirac.py +++ b/tests/test_random_variables/test_dirac.py @@ -4,7 +4,6 @@ import numpy as np from probnum import random_variables as rvs -from probnum import utils as _utils class TestDirac(unittest.TestCase): diff --git a/tests/test_core/test_random_variables/test_normal.py b/tests/test_random_variables/test_normal.py similarity index 100% rename from tests/test_core/test_random_variables/test_normal.py rename to tests/test_random_variables/test_normal.py diff --git a/tests/test_core/test_random_variables/test_random_variable.py b/tests/test_random_variables/test_random_variable.py similarity index 100% rename from tests/test_core/test_random_variables/test_random_variable.py rename to tests/test_random_variables/test_random_variable.py