I run some code within a for loop. I want to take the results from my loop and place them in a 2d array with 2 columns and as many rows as times I iterate the loop. Here's a simplified version of what I have:
for i in range(10):
'bunch of stuff'
centerx = xc
centery = yc
How can I save my values for centerx
and centery
in a 2d array with 2 columns and 10 rows? Any help is appreciated, thanks!
Best Answer
You can try this:
This will output an ndarray like this:
Or this maybe is better: