@@ -29,9 +29,9 @@ def test_random_vector(self):
2929 signalmatype = 0
3030 )
3131
32- self .assertTrue (np .array_equal (this_macd , that_macd , equal_nan = True ), f"{ close } , { this_macd } , { that_macd } " )
33- self .assertTrue (np .array_equal (this_signal , that_signal , equal_nan = True ), f"{ close } , { this_signal } , { that_signal } " )
34- self .assertTrue (np .array_equal (this_hist , that_hist , equal_nan = True ), f"{ close } , { this_hist } , { that_hist } " )
32+ self .assertTrue (np .allclose (this_macd , that_macd , equal_nan = True ), f"{ close } , { this_macd } , { that_macd } " )
33+ self .assertTrue (np .allclose (this_signal , that_signal , equal_nan = True ), f"{ close } , { this_signal } , { that_signal } " )
34+ self .assertTrue (np .allclose (this_hist , that_hist , equal_nan = True ), f"{ close } , { this_hist } , { that_hist } " )
3535
3636 def test_custom_periods_and_types (self ):
3737 close = np .random .random (1000 )
@@ -54,9 +54,9 @@ def test_custom_periods_and_types(self):
5454 signalmatype = 3
5555 )
5656
57- self .assertTrue (np .array_equal (this_macd , that_macd , equal_nan = True ))
58- self .assertTrue (np .array_equal (this_signal , that_signal , equal_nan = True ))
59- self .assertTrue (np .array_equal (this_hist , that_hist , equal_nan = True ))
57+ self .assertTrue (np .allclose (this_macd , that_macd , equal_nan = True ))
58+ self .assertTrue (np .allclose (this_signal , that_signal , equal_nan = True ))
59+ self .assertTrue (np .allclose (this_hist , that_hist , equal_nan = True ))
6060
6161if __name__ == '__main__' :
6262 unittest .main ()
0 commit comments