0

Can you please explain why

x = np.array([1, 2, 3]) returns shape of (3,)

while

x = np.array([[1, 2, 3]]) returns (3, 1)

  • Thank you Tharun K for your reply. Indeed this gives a lot of information related to my confusion about the way arrays work. I am not sure if I have missed something obvious but so far I haven't found such clear approach from numpy.org or textbooks. – Dimosthenis Zografos May 11 '21 at 14:18

0 Answers0