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

Method test_numpy_ravel_order

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

Source from the content-addressed store, hash-verified

418 assert_equal(self.m.flatten().shape, (1, 2))
419
420 def test_numpy_ravel_order(self):
421 x = np.array([[1, 2, 3], [4, 5, 6]])
422 assert_equal(np.ravel(x), [1, 2, 3, 4, 5, 6])
423 assert_equal(np.ravel(x, order='F'), [1, 4, 2, 5, 3, 6])
424 assert_equal(np.ravel(x.T), [1, 4, 2, 5, 3, 6])
425 assert_equal(np.ravel(x.T, order='A'), [1, 2, 3, 4, 5, 6])
426 x = matrix([[1, 2, 3], [4, 5, 6]])
427 assert_equal(np.ravel(x), [1, 2, 3, 4, 5, 6])
428 assert_equal(np.ravel(x, order='F'), [1, 4, 2, 5, 3, 6])
429 assert_equal(np.ravel(x.T), [1, 4, 2, 5, 3, 6])
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]])

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
matrixClass · 0.90
ravelMethod · 0.45

Tested by

no test coverage detected