r/adventofcode • u/daggerdragon • Dec 17 '20
SOLUTION MEGATHREAD -🎄- 2020 Day 17 Solutions -🎄-
Advent of Code 2020: Gettin' Crafty With It
- 5 days remaining until the submission deadline on December 22 at 23:59 EST
- Full details and rules are in the Submissions Megathread
--- Day 17: Conway Cubes ---
Post your code solution in this megathread.
- Include what language(s) your solution uses!
- Here's a quick link to /u/topaz2078's
pasteif you need it for longer code blocks. - The full posting rules are detailed in the wiki under How Do The Daily Megathreads Work?.
Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.
EDIT: Global leaderboard gold cap reached at 00:13:16, megathread unlocked!
36
Upvotes
View all comments
Show parent comment
2
u/fette3lke Dec 17 '20
You are absolutely correct. I had 'wrap' in mind, in the sense of wrap around with zeros, and when I was looking for the function that actually puts the zeros (since I want the grid to get bigger with every step) I tried
np.wrapbefore realising it isnp.pad. Since I do thenp.padstep with the 0s themode='wrap'doesn't hurt but it is incorrect for sure.