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

Method test_basic

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

Source from the content-addressed store, hash-verified

306class TestCopy:
307
308 def test_basic(self):
309 a = np.array([[1, 2], [3, 4]])
310 a_copy = np.copy(a)
311 assert_array_equal(a, a_copy)
312 a_copy[0, 0] = 10
313 assert_equal(a[0, 0], 1)
314 assert_equal(a_copy[0, 0], 10)
315
316 def test_order(self):
317 # 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