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

Method test_array_memory_sharing

numpy/matrixlib/tests/test_defmatrix.py:439–441  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

437 assert_equal(x.T.ravel(order='A'), [[1, 2, 3, 4, 5, 6]])
438
439 def test_array_memory_sharing(self):
440 assert_(np.may_share_memory(self.a, self.a.ravel()))
441 assert_(not np.may_share_memory(self.a, self.a.flatten()))
442
443 def test_matrix_memory_sharing(self):
444 assert_(np.may_share_memory(self.m, self.m.ravel()))

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
flattenMethod · 0.80
ravelMethod · 0.45

Tested by

no test coverage detected