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

Method test_matrix_ravel_order

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

Source from the content-addressed store, hash-verified

430 assert_equal(np.ravel(x.T, order='A'), [1, 2, 3, 4, 5, 6])
431
432 def test_matrix_ravel_order(self):
433 x = matrix([[1, 2, 3], [4, 5, 6]])
434 assert_equal(x.ravel(), [[1, 2, 3, 4, 5, 6]])
435 assert_equal(x.ravel(order='F'), [[1, 4, 2, 5, 3, 6]])
436 assert_equal(x.T.ravel(), [[1, 4, 2, 5, 3, 6]])
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()))

Callers

nothing calls this directly

Calls 3

matrixClass · 0.90
assert_equalFunction · 0.90
ravelMethod · 0.45

Tested by

no test coverage detected