MCPcopy Create free account
hub / github.com/Drakkar-Software/OctoBot / test_shift_value_array

Function test_shift_value_array

packages/commons/tests/test_data_util.py:32–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

30
31
32def test_shift_value_array():
33 array = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=np.float64)
34 np.testing.assert_array_equal(shift_value_array(array, shift_count=-1, fill_value=np.nan),
35 np.array([2, 3, 4, 5, 6, 7, 8, 9, np.nan], dtype=np.float64))
36
37 array = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9], dtype=np.float64)
38 np.testing.assert_array_equal(shift_value_array(array, shift_count=2, fill_value=np.nan),
39 np.array([np.nan, np.nan, 1, 2, 3, 4, 5, 6, 7], dtype=np.float64))

Callers

nothing calls this directly

Calls 1

shift_value_arrayFunction · 0.90

Tested by

no test coverage detected