-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
import numpy as np
sq=np.array([[1,15,14,4],[12,6,7,9],[8,10,11,5],[13,3,2,16]])
def check():
target=34
print(sq.sum(axis=0),sq.sum(axis=1),np.trace(sq),np.trace(np.fliplr(sq)))
# 2x2 sums
sums=[]
for i in range(3):
for j in range(3):
sums.append(sq[i:i+2,j:j+2].sum())
print(sums, len(set(sums)))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels