Skip to content

Commit

Permalink
My goodness, I made a beginner`s mistake and compared floats! Corrected.
Browse files Browse the repository at this point in the history
  • Loading branch information
sigvaldm committed Mar 17, 2021
1 parent 3bd7f96 commit 6669f49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_localreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_localreg_integer():
y = 0.5*x # Simple linear function should be exactly matched by degree=1
x0 = np.array([1], dtype=int)
y0 = localreg(x, y, x0, degree=1, width=3)
assert y0[0]==0.5
assert y0[0]==pytest.approx(0.5)
# assert np.allclose(x0, y0)

#
Expand Down

0 comments on commit 6669f49

Please sign in to comment.