Skip to content

Commit

Permalink
Improves the round error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
StuntsPT committed May 14, 2018
1 parent 98e6870 commit 57fe794
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/test_md_outlier_remover.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ def test_mhbs_dist_calculator():

test_dist = np.round(mor.mahalanobis_dist_calculator(x_coord, y_coord), 6)

control_dist = np.array([1.226738, 1.758397, 1.895296, 1.445191, 0.798041,
0.691544, 0.91972, 0.550318, 0.674364, 1.247352,
1.462154, 1.597006, 1.493014, 2.163516, 1.136237,
1.59959])
control_dist = [1.2267382045449271, 1.758397269372304, 1.8952957763364617,
1.445191223272221, 0.79804140504730503,
0.69154415059165508, 0.919720382796942,
0.55031781984857764, 0.67436391809087115,
1.2473515530849255, 1.462153503620737, 1.5970060007168538,
1.4930142356624654, 2.1635163089688803, 1.1362365779638146,
1.5995900954742315]
control_dist = np.round(control_dist, 6)

assert test_dist.all() == control_dist.all()

Expand Down

0 comments on commit 57fe794

Please sign in to comment.