I am getting a TypeError when I try to eliminate the negative values in this array. I didn't have this problem in a previous iteration of this code, but I suppose that that particular data didn't have negative values in it. I don't understand how the data ends up being a tuple....is that a "feature" of np.loadtxt? Did I make it a tuple when I swapped the columns/rows in the zip function? I want to know how to fix this, but I'd also love an explanation as to how the data ended up being a tuple in the first place. Also, I feel like there is probably a more elegant way to do this than a "for" loop, and I'd appreciate any insight into that.
my_array = np.loadtxt(cw.my_Fname, delimiter=',', skiprows = 12, usecols = necessary_data_columns)
my_array = zip(*my_array)
i=0
for value in my_array[6]:
if value < 0:
my_array[6][i] = 0
i += 1
TypeError: 'tuple' object does not support item assignment