Python doubt in mean

for ne, naa in zip(ne, naa): 
print(*a, sep = ", ")

I wanted to put all data inside the array, and print whats inside it.
I think the array is overwriting, and its stuck on the first position. How can i store all values in this array?

I tried this to:


And i get the same result.
The output is just a value and not all the values.
Can someone help me?

The approach should work.
Could you check the size of ne and naa?
zip will just use the smaller of both lengths. If one of these tensors only contains a single sample, you would only use a single iteration.

Ah sorry, I missed the errors.

You are currently overwriting ne and naa in the loop, so use other variable names for the single elements and also move the a.append call inside the loop:

for ne_, naa_ in zip(ne, naa): 
1 Like

Thank you :slight_smile: