diff options
Diffstat (limited to 'day14.py')
-rw-r--r-- | day14.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/day14.py b/day14.py new file mode 100644 index 0000000..c5889e2 --- /dev/null +++ b/day14.py @@ -0,0 +1,8 @@ +import numpy as np +from scipy.ndimage import label + +with open("day14regions.txt") as regions: + hash = np.array([list(map(int, line.strip())) for line in regions]) + _, num_features = label(hash) + print(num_features) + \ No newline at end of file |