Posts by Antonio Frioli • 1 point
1 post
-
-4
votes1
answer27
viewsQ: How can I check if there are equal numbers in the same column or row in a numpy matrix?
from random import sample import numpy as np a = sample(range(1, 5), 4) b = sample(range(1, 5), 4) c = sample(range(1, 5), 4) d = sample(range(1, 5), 4) jogo = np.array([[a[0], a[1], b[1], b[2]],…