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

Method test_wide_matrix

numpy/lib/tests/test_index_tricks.py:476–483  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

474 )
475
476 def test_wide_matrix(self):
477 a = np.zeros((3, 10), int)
478 fill_diagonal(a, 5)
479 assert_array_equal(
480 a, np.array([[5, 0, 0, 0, 0, 0, 0, 0, 0, 0],
481 [0, 5, 0, 0, 0, 0, 0, 0, 0, 0],
482 [0, 0, 5, 0, 0, 0, 0, 0, 0, 0]])
483 )
484
485 def test_operate_4d_array(self):
486 a = np.zeros((3, 3, 3, 3), int)

Callers

nothing calls this directly

Calls 2

fill_diagonalFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected