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

Method test_matrix_memory_sharing

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

Source from the content-addressed store, hash-verified

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()))
445 assert_(not np.may_share_memory(self.m, self.m.flatten()))
446
447 def test_expand_dims_matrix(self):
448 # matrices are always 2d - so expand_dims only makes sense when the

Callers

nothing calls this directly

Calls 3

assert_Function · 0.90
flattenMethod · 0.80
ravelMethod · 0.45

Tested by

no test coverage detected