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

Method test_basic

numpy/core/tests/test_multiarray.py:5819–5827  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5817
5818 @_no_tracing
5819 def test_basic(self):
5820 x = np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])
5821 if IS_PYPY:
5822 x.resize((5, 5), refcheck=False)
5823 else:
5824 x.resize((5, 5))
5825 assert_array_equal(x.flat[:9],
5826 np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]]).flat)
5827 assert_array_equal(x[9:].flat, 0)
5828
5829 def test_check_reference(self):
5830 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.45

Tested by

no test coverage detected