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

Method test_wide_matrix

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

Source from the content-addressed store, hash-verified

452 )
453
454 def test_wide_matrix(self):
455 a = np.zeros((3, 10), int)
456 fill_diagonal(a, 5)
457 assert_array_equal(
458 a, np.array([[5, 0, 0, 0, 0, 0, 0, 0, 0, 0],
459 [0, 5, 0, 0, 0, 0, 0, 0, 0, 0],
460 [0, 0, 5, 0, 0, 0, 0, 0, 0, 0]])
461 )
462
463 def test_operate_4d_array(self):
464 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