[Numpy-discussion] Reading and Comparing Two Files

Robert Love rblove_lists@comcast....
Sat Feb 27 20:43:25 CST 2010


What is the efficient numpy way to compare data from two different files?  For the nth line in each file I want to operate on the numbers.   I've been using loadtxt()

data_5x5 = N.loadtxt("file5")

data_8x8 = N.loadtxt("file8")

for line in data_5x5:
	pos5 = N.array([line[0], line[1],  line[2]])

This works fine for one file but how to I get the same line's worth of data from the other file?






More information about the NumPy-Discussion mailing list