Skip to content

Commit

Permalink
Update test_unumpy.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Myles244 committed Dec 19, 2024
1 parent 4fba174 commit 86f8f7d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_unumpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,16 @@ def test_component_extraction():
assert numpy.all(unumpy.std_devs(mat) == [0.1, 0.2])
assert type(unumpy.nominal_values(mat)) == numpy.matrix

def test_ufloat_from_sample():
"Test genarating a number with an uncertainty from a sample"

test_sample=[-1.5,-0.5,0,0.5,1.5]

num = core.ufloat_from_sample(test_sample)

assert numbers_close(num.n,0)
assert numbers_close(num.s,0.5)


def test_array_comparisons():
"Test of array and matrix comparisons"
Expand Down

0 comments on commit 86f8f7d

Please sign in to comment.