Skip to content

Instantly share code, notes, and snippets.

@leangaurav
Created May 29, 2019 16:40
Show Gist options
  • Save leangaurav/12aa97fc86c0aee4612664a6653944e2 to your computer and use it in GitHub Desktop.
Save leangaurav/12aa97fc86c0aee4612664a6653944e2 to your computer and use it in GitHub Desktop.

matrix.py

def is_skew_ymmetric(mat):
    # Write Code
    pass

Test Code

import matrix

mat1 = matrix.create_linear_matrix(3,3)

mat2 = matrix.transpose(mat1)

mat3 = matrix.sub(mat1, mat2) # M - Mt

print("Mat1:", matrix.is_skew_symmetric(mat1))
matrix.print_matrix(mat1)

print("\nMat3:", matrix.is_skew_symmetric(mat3))
matrix.print_matrix(mat3)

Output
Mat1: False
1 2 3
4 5 6
7 8 9

Mat3: True
*0 -2 -4 *2 0 -2 *4 2 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment