Created
August 8, 2022 18:58
-
-
Save eliasffyksen/b961b335d9f495c48baa30f1eb85ff88 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