Skip to content

Instantly share code, notes, and snippets.

@BigBri92
Last active August 30, 2017 00:37
Show Gist options
  • Save BigBri92/5776683 to your computer and use it in GitHub Desktop.
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
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