From e72302fa9e4324cc45cc67a3eba51435211129f4 Mon Sep 17 00:00:00 2001 From: Tyler Kennedy Date: Wed, 18 May 2022 09:21:37 -0400 Subject: [PATCH] Whatever github ci is running on gives less precise floating point results on ARM. --- tests/test_func.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_func.py b/tests/test_func.py index 643f1b504..5fffaad22 100644 --- a/tests/test_func.py +++ b/tests/test_func.py @@ -1,5 +1,5 @@ import numpy as np -from numpy.testing import assert_array_equal +from numpy.testing import assert_array_equal, assert_array_almost_equal import pytest import talib @@ -159,7 +159,7 @@ def test_RSI(): result = func.RSI(a, 10) assert_array_equal(result, [np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,0,0,0,0,0,0,0,0,0,0]) result = func.RSI(a * 100000, 10) - assert_array_equal(result, [np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,33.333333333333329,51.351351351351347,39.491916859122398,51.84807024709005,42.25953803191981,52.101824405061215,52.101824405061215,43.043664867691085,43.043664867691085,43.043664867691085]) + assert_array_almost_equal(result, [np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,np.nan,33.333333333333329,51.351351351351347,39.491916859122398,51.84807024709005,42.25953803191981,52.101824405061215,52.101824405061215,43.043664867691085,43.043664867691085,43.043664867691085]) def test_MAVP():