mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
removed unnecessary imports from tests
This commit is contained in:
parent
bb9790acd7
commit
e46746e4ca
4 changed files with 12 additions and 22 deletions
|
@ -1,16 +1,13 @@
|
|||
import autograd.numpy as np
|
||||
import os
|
||||
import random
|
||||
import string
|
||||
import copy
|
||||
import math
|
||||
import scipy.optimize
|
||||
from scipy.odr import ODR, Model, Data, RealData
|
||||
from scipy.odr import ODR, Model, RealData
|
||||
import pyerrors as pe
|
||||
import pytest
|
||||
|
||||
np.random.seed(0)
|
||||
|
||||
|
||||
def test_standard_fit():
|
||||
dim = 10 + int(30 * np.random.rand())
|
||||
x = np.arange(dim)
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
import sys
|
||||
sys.path.append('..')
|
||||
import autograd.numpy as np
|
||||
import os
|
||||
import random
|
||||
import math
|
||||
import string
|
||||
import copy
|
||||
import scipy.optimize
|
||||
from scipy.odr import ODR, Model, Data, RealData
|
||||
import pyerrors as pe
|
||||
import pytest
|
||||
|
||||
np.random.seed(0)
|
||||
|
||||
|
||||
def test_matrix_functions():
|
||||
dim = 3 + int(4 * np.random.rand())
|
||||
print(dim)
|
||||
|
@ -55,4 +48,3 @@ def test_matrix_functions():
|
|||
tmp[j].gamma_method()
|
||||
assert math.isclose(tmp[j].value, 0.0, abs_tol=1e-9), 'value ' + str(i) + ',' + str(j)
|
||||
assert math.isclose(tmp[j].dvalue, 0.0, abs_tol=1e-9), 'dvalue ' + str(i) + ',' + str(j)
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import pytest
|
|||
|
||||
np.random.seed(0)
|
||||
|
||||
|
||||
def test_dump():
|
||||
value = np.random.normal(5, 10)
|
||||
dvalue = np.abs(np.random.normal(0, 1))
|
||||
|
|
|
@ -4,6 +4,7 @@ import pytest
|
|||
|
||||
np.random.seed(0)
|
||||
|
||||
|
||||
def test_root_linear():
|
||||
|
||||
def root_function(x, d):
|
||||
|
@ -16,4 +17,3 @@ def test_root_linear():
|
|||
assert np.isclose(my_root.value, value)
|
||||
difference = my_obs - my_root
|
||||
assert all(np.isclose(0.0, difference.deltas['t']))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue