Skip to content

Commit a433f5a

Browse files
TST: fix a test giving different results on amd64 vs arm64
1 parent e0bbfdf commit a433f5a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pyfolio/tests/test_timeseries.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -264,12 +264,12 @@ class TestStats(TestCase):
264264
dt_2 = pd.date_range('2000-1-3', periods=8, freq='D')
265265

266266
@parameterized.expand([
267-
(simple_rets[:5], 2, [np.nan, np.inf, np.inf, 11.224972160321, 0])
267+
(simple_rets[:5], 2, [0, np.inf, np.inf, 11.224972160321, 0])
268268
])
269269
def test_sharpe_2(self, returns, rolling_sharpe_window, expected):
270270
np.testing.assert_array_almost_equal(
271271
timeseries.rolling_sharpe(returns,
272-
rolling_sharpe_window).values,
272+
rolling_sharpe_window).fillna(0).values,
273273
np.asarray(expected))
274274

275275
@parameterized.expand([

0 commit comments

Comments
 (0)