Created
August 8, 2022 18:58
-
-
Save eliasffyksen/46984c82da54a3fc39e1b8d76ef1a8df to your computer and use it in GitHub Desktop.
This file contains hidden or 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
positions = snake.flatten().topk(2)[1] | |
[pos_cur, pos_prev] = [T(unravel(x, snake.shape)) for x in positions] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment