Skip to content

Instantly share code, notes, and snippets.

@st0le
Created June 7, 2013 23:57
Show Gist options
  • Save st0le/5733217 to your computer and use it in GitHub Desktop.
Save st0le/5733217 to your computer and use it in GitHub Desktop.
Matrix Operations
def transpose(X):
return map(list,zip(*X))
def reverse_rows(X):
return map(lambda x:list(reversed(x)),X)
def reverse_cols(X):
return list(reversed(X))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment