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

Method test_basic

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

Source from the content-addressed store, hash-verified

411
412class TestFillDiagonal:
413 def test_basic(self):
414 a = np.zeros((3, 3), int)
415 fill_diagonal(a, 5)
416 assert_array_equal(
417 a, np.array([[5, 0, 0],
418 [0, 5, 0],
419 [0, 0, 5]])
420 )
421
422 def test_tall_matrix(self):
423 a = np.zeros((10, 3), int)

Callers

nothing calls this directly

Calls 2

fill_diagonalFunction · 0.90
assert_array_equalFunction · 0.90

Tested by

no test coverage detected