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

Method test_basic

numpy/lib/tests/test_function_base.py:256–262  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

254class TestCopy:
255
256 def test_basic(self):
257 a = np.array([[1, 2], [3, 4]])
258 a_copy = np.copy(a)
259 assert_array_equal(a, a_copy)
260 a_copy[0, 0] = 10
261 assert_equal(a[0, 0], 1)
262 assert_equal(a_copy[0, 0], 10)
263
264 def test_order(self):
265 # It turns out that people rely on np.copy() preserving order by

Callers

nothing calls this directly

Calls 3

assert_array_equalFunction · 0.90
assert_equalFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected