Re: Maximum List size (item number) limit?



Juho Schultz
>NIR_mean_l only from lines 1, 4, 7, ...
>R_mean_l only from lines 2, 5, 8, ...
>G_mean_l only from lines 3, 6, 9, ...

This can be the problem, but it can be right too.
The following code is shorter and I hope cleaner, with it maybe
Kriston-Vizi Janos can fix his problem.

class ReadData:
def __init__(self, filename):
self.NIR_mean = []
self.NIR_stdev = []
self.R_mean = []
self.R_stdev = []
self.G_mean = []
self.G_stdev = []
self.area = []

for line in file(filename):
row = line.split()
self.area.append(row[1])
self.NIR_mean.append(row[2])
self.NIR_stdev.append(row[3])
self.R_mean.append(row[4])
self.R_stdev.append(row[5])
self.G_mean.append(row[6])
self.G_stdev.append(row[7])

# -------------------------------
L = ReadData('L.txt')
GC = ReadData('GC.txt')
out_file = file('merged.txt', 'w')

# Create output rows from lists
for i in xrange(len(L.NIR_mean)): # Process all input rows

# Filter L and GC rows by area values
if (10000 <= float(L.area[i]) <= 100000) and \
(10000 <= float(GC.area[i]) <= 100000):

# Create output line and write out
newline = [str(i+1)]
for obj in L, GC:
newline.extend([obj.NIR_mean[i], obj.NIR_stdev[i],
obj.R_mean[i], obj.R_stdev[i],
obj.G_mean[i], obj.G_stdev[i],
obj.area[i]])
outline = '\t'.join(newline) + '\n'
out_file.write(outline)

out_file.close()

.



Relevant Pages

  • Re: Help: Bike shop trying to screw me (I think)
    ... cleaned the carbs, changed the oil and fuel filter, and ... Heck of a price for and oil change and a shot of carb cleaner. ... Will replacing the gas tank fix stalling/won't restart issues or are ...
    (rec.motorcycles.tech)
  • Re: why Microsoft really opposes Open Source
    ... >> Can you please fix your signature, and make it shorter? ... >> You keep mixing it up with your replies, ...
    (comp.programming)
  • Re: Unable to load scripts/google.tcl (error: cant find package http)
    ... :i did export -p to show a list of all the exports and the PATH one was ... you how to fix it to find tclsh since I don't know where your root user ... installed tclsh on your system... ... will at least be a bit cleaner. ...
    (comp.lang.tcl)
  • Re: post 2.6.21 regression in F_GETLK
    ... fcntl11. ... F_RDLCK and allows taking out a write lock. ... I have hacked up a much shorter version which demonstrates the issue and ... This doesn't fix the problem but it does look like it should be there. ...
    (Linux-Kernel)
  • Re: P70 that wont P70
    ... sure if this is the longterm fix but the PC has been on at least 24hrs ... I removed the video card from PC and gave it a generous (excuse the ... loose term) DOUCHING with electro contact cleaner and then I sprayed ... Then I took a pencil eraser and cleaned (channel) contacts on both ...
    (comp.sys.ibm.ps2.hardware)