I need suggestions for a way to take values from an array I built. I need to take them two rows at a time and be able to access each element of the two rows individually.
This works for printing each element, but it works in [column][row]. I have attached the file I'm working on
import numpy as np ''' Created on Jan 27, 2013 @author: ''' f ='/Users/Documents/workspace/findMinMax/crapc.txt' x,y,z = np.loadtxt(f, unpack=True, usecols=(1,2,3), ndmin = 2) maxZ = max(z) minZ = min(z) print("Maximum Z value: " + str(maxZ)) print("Minimum Z value: " + str(minZ)) zIncrement = .5 steps = maxZ/zIncrement currentStep = .5 matrix = [x,y,z] [[row[i] for row in matrix] for i in range(3)] #print(matrix[2][3]) print() for i in matrix: print(i[2])
This works for printing each element, but it works in [column][row]. I have attached the file I'm working on