I want to print every value out of my numpy array 1 value at a time across each row column by column. I have some code like this at the moment.
col = 0
row = 0
for i in hillarray:
print('col', x, 'row', y, hillarray[col, row])
col = col + 1
if col == 1936:
row = row + 1
row == 0
I can get this code to print the values of the whole first row col by col. Its just getting it to restart again for the next row. I think the if part of the statement is wrong and therefore not moving to the next row resetting the value of col to 0 and then reporting the for loop again.
hillarray
is not defined. Please provide a reproducible example. – Michael Szczesny Oct 20 '20 at 10:28