Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Varriount/d9915ffc2261aa187ef7661c52e5b828 to your computer and use it in GitHub Desktop.
Save Varriount/d9915ffc2261aa187ef7661c52e5b828 to your computer and use it in GitHub Desktop.
proc `*`*[M,N,T,T2,K](a: Matrix[M,N,T]; k:K): Matrix[M,N,T2]=
for i in result.low .. result.high:
for j in result[0].low .. result[0].high:
result[i][j] = k * a[i][j]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment