+ 1
iterate over matrix, and print its index as (i,j) and corresponding value. For example, Index: (1,1), Value: 50. y = np.array([[
iterate over matrix, and print its index as (i,j) and corresponding value. For example, Index: (1,1), Value: 50. y = np.array([[11,22,33,44], [55,66,77,88],[88,99,10,11],[11,22,33,55]]) Is this possible to implement without a loop?
1 Respuesta
+ 1
For row in y:
For col in row:
print(col)