Skip to content

Instantly share code, notes, and snippets.

@andrewcsmith
Created April 10, 2014 04:27
Show Gist options
  • Save andrewcsmith/10342529 to your computer and use it in GitHub Desktop.
Save andrewcsmith/10342529 to your computer and use it in GitHub Desktop.
#rank, :reference assignment
[331] pry(main)> out
=>
{ layers:
[
[0, 1]
[0, 0]
]
[
[1, 0]
[0, 0]
]
}
[332] pry(main)> first
=>
{ layers:
[
[0, 2]
]
[
[1, 3]
]
}
# It would be great if this were possible
[335] pry(main)> out.rank(0, 0...out.shape[0]-1, :reference) = first
SyntaxError: unexpected '=', expecting end-of-input
out.rank(0, 0...out.shape[0]-1, :reference) = first
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment