teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

使っている関数が違った

2021/07/27 10:55

投稿

s.s.
s.s.

スコア1

title CHANGED
File without changes
body CHANGED
@@ -4,7 +4,7 @@
4
4
  import numpy as np
5
5
 
6
6
  vec = np.array(range(6))
7
- vec.reshape(6,1)
7
+ np.reshape(vec, (6,1))
8
8
  print(vec.shape) #ここで(6,1)になってほしい
9
9
 
10
10
  mat = np.dot(vec, vec.T)