Created
November 17, 2018 04:36
-
-
Save manvillej/ee9e05ad98eb747b8ac4fdb473286767 to your computer and use it in GitHub Desktop.
use this function to calculate the resulting matrix from raising matrix to the 2^baseTwoTurns power.
This file contains hidden or 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 getBaseTwoTurnsMatrix(matrix, baseTwoTurns): | |
""" | |
use this function to calculate the resulting matrix from raising matrix to the 2^baseTwoTurns power. | |
""" | |
for _ in range(baseTwoTurns): | |
matrix = matrix*matrix | |
return matrix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment