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

Method test_basic

numpy/_core/tests/test_multiarray.py:6741–6746  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6739
6740 @_no_tracing
6741 def test_basic(self):
6742 x = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
6743 x.resize((5, 5))
6744 assert_array_equal(x.flat[:9],
6745 np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]).flat)
6746 assert_array_equal(x[9:].flat, 0)
6747
6748 def test_check_reference(self):
6749 x = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
resizeMethod · 0.80

Tested by

no test coverage detected