+ 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?

3rd Oct 2021, 12:40 PM
Zhenis Otarbay
Zhenis Otarbay - avatar
1 Respuesta
+ 1
For row in y: For col in row: print(col)
7th Nov 2021, 6:07 AM
Cristian Baeza Jimenez
Cristian Baeza Jimenez - avatar