0

I am having a bit of misunderstanding with numpy array I have a set of two data (m, error) which I would like to plot

I save them in the array like this as I catch them in the same loop (which is probably causing the issue)

sum_error = np.append(m,error)

Then just simply trying to plot like this but it doesn't work as apparently this array is only of size 1 (with a tuple?)

plt.scatter(x=sum_error[:, 0], y=sum_error[:, 1])

What is the correct way to proceed? should I really make two different arrays, one for m, one for error in order to plot them?

Thanks

1 Answers1

0

As it is answered on this thread, try using

np.vstack((m,error))
gingras.ol
  • 186
  • 15