Last active
August 30, 2017 00:37
-
-
Save BigBri92/5776683 to your computer and use it in GitHub Desktop.
One liner for python that simulates repmat from MATLAB. Works for a matrix input as a 2d list
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 repmat(matrixA, rowFinal, colFinal): | |
return [matrixA[i] * colFinal for i in range(len(matrixA))] * rowFinal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment