MCPcopy Create free account
hub / github.com/numpy/numpy / test_2d_with_axis

Method test_2d_with_axis

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

Source from the content-addressed store, hash-verified

421 assert_array_equal(arr_view, expected)
422
423 def test_2d_with_axis(self):
424 i, j = np.ogrid[:3, :4]
425 arr = 10*i + j
426 arr_view = sliding_window_view(arr, 3, 0)
427 expected = np.array([[[0, 10, 20],
428 [1, 11, 21],
429 [2, 12, 22],
430 [3, 13, 23]]])
431 assert_array_equal(arr_view, expected)
432
433 def test_2d_repeated_axis(self):
434 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