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

Method test_2d_with_axis

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

Source from the content-addressed store, hash-verified

436 assert_array_equal(arr_view, expected)
437
438 def test_2d_with_axis(self):
439 i, j = np.ogrid[:3, :4]
440 arr = 10 * i + j
441 arr_view = sliding_window_view(arr, 3, 0)
442 expected = np.array([[[0, 10, 20],
443 [1, 11, 21],
444 [2, 12, 22],
445 [3, 13, 23]]])
446 assert_array_equal(arr_view, expected)
447
448 def test_2d_repeated_axis(self):
449 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