MCPcopy Index your code
hub / github.com/numpy/numpy / test_1d

Method test_1d

numpy/lib/tests/test_stride_tricks.py:416–423  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

414
415class TestSlidingWindowView:
416 def test_1d(self):
417 arr = np.arange(5)
418 arr_view = sliding_window_view(arr, 2)
419 expected = np.array([[0, 1],
420 [1, 2],
421 [2, 3],
422 [3, 4]])
423 assert_array_equal(arr_view, expected)
424
425 def test_2d(self):
426 i, j = np.ogrid[:3, :4]

Callers

nothing calls this directly

Calls 2

sliding_window_viewFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected