If I execute the code below
x = np.linspace(1, 12, 5)
and if I display I get a result as
array([ 1. , 3.75, 6.5 , 9.25, 12. ])
and if I do a shape() function on x then I get
(5,)
My question is that if we see the result then it is an array with one row and 5 columns then why do I see (5,) in shape. Shouldn't it be (1,5) 1X5 matrix
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…