I am thoroughly perplexed over the following behavior:
gap_in_y[i][j] = max((scoreMatrix[i-1][j] - dy), (gap_in_y[i-1][j] - ey))
if i == 3 and j == 1:
print gap_in_y
gap_in_x[i][j] = max((scoreMatrix[i][j-1] - dx), (gap_in_x[i][j-1] - ex))
if i == 3 and j == 1:
print gap_in_y
The two print statements produce arrays that are different in exactly one value: the value contained in gap_in_y[3][1]. Modifying gap_in_x, a separate array, shouldn't affect gap_in_y... but, somehow it does.
Any ideas? I've been going crazy trying to figure this out!
I created the two arrays in the following manner:
for i in range (0, ALength+1):
for j in range (0, BLength+1):
new.append("N/A")
gap_in_y.append(new)
gap_in_x.append(new)
new = []