Skip to content

Instantly share code, notes, and snippets.

@nelsnelson
Created April 21, 2011 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nelsnelson/934646 to your computer and use it in GitHub Desktop.
Save nelsnelson/934646 to your computer and use it in GitHub Desktop.
Excerpt
def Matrix.columns(columns)
rows = (0 .. columns[0].size - 1).collect {
|i|
(0 .. columns.size - 1).collect {
|j|
columns[j][i]
}
}
Matrix.rows(rows, false)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment