MCPcopy Index your code
hub / github.com/TheAlgorithms/Python / test_transpose

Function test_transpose

matrix/tests/test_matrix_operation.py:112–120  ·  view source on GitHub ↗
(mat)

Source from the content-addressed store, hash-verified

110@pytest.mark.mat_ops
111@pytest.mark.parametrize("mat", [mat_a, mat_b, mat_c, mat_d, mat_e, mat_f])
112def test_transpose(mat):
113 if (np.array(mat)).shape < (2, 2):
114 logger.info(f"\n\t{test_transpose.__name__} returned integer")
115 with pytest.raises(TypeError):
116 matop.transpose(mat)
117 else:
118 act = (np.transpose(mat)).tolist()
119 theo = matop.transpose(mat, return_map=False)
120 assert theo == act

Callers

nothing calls this directly

Calls 1

transposeMethod · 0.80

Tested by

no test coverage detected