Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
これはややばかげた質問ですが、面倒です。それぞれ7680個の要素を持つ800個のndarrayのリストがあります。これを <800,7680> 形式に変換するにはどうすればよいですか?
np.arrayファクトリ関数に渡すだけです。例として:
np.array
>>> lst = [np.zeros(7680) for x in range(800)] #just a list of 800 ndarrays ... >>> arr = np.array(lst) #make them into an array >>> arr.shape #shape looks OK to me :-) (800, 7680)