mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 11:33:42 +02:00
refactor: unnecessary overloading of np.sinc removed, tests added
This commit is contained in:
parent
64a8bc690f
commit
b7da7f4b7e
2 changed files with 7 additions and 3 deletions
|
@ -57,6 +57,7 @@ def test_dump():
|
|||
value = np.random.normal(5, 10)
|
||||
dvalue = np.abs(np.random.normal(0, 1))
|
||||
test_obs = pe.pseudo_Obs(value, dvalue, 't')
|
||||
test_obs.dump('test_dump', path=".")
|
||||
test_obs.dump('test_dump')
|
||||
new_obs = pe.load_object('test_dump.p')
|
||||
os.remove('test_dump.p')
|
||||
|
@ -105,6 +106,12 @@ def test_function_overloading():
|
|||
assert np.sqrt(b ** 2) == b
|
||||
assert np.sqrt(b) ** 2 == b
|
||||
|
||||
np.arcsin(1 / b)
|
||||
np.arccos(1 / b)
|
||||
np.arctan(1 / b)
|
||||
np.arctanh(1 / b)
|
||||
np.sinc(1 / b)
|
||||
|
||||
|
||||
def test_overloading_vectorization():
|
||||
a = np.random.randint(1, 100, 10)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue