Created
June 7, 2013 23:57
-
-
Save st0le/5733217 to your computer and use it in GitHub Desktop.
Matrix Operations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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