pythonのプログラムなのですが、処理にかかる時間が長く困っています。改善策があれば教えてください。
python
1m2 = np.empty((0,80)) 2for x in m: 3 tmp = np.empty(0) 4 tmp2 = np.empty(0) 5 for y in x: 6 tmp2 = np.append(tmp2,y) 7 count += 1 8 if count == 100: 9 tmp=np.append(tmp,np.max(tmp2)) 10 tmp2 = np.empty(0) 11 count = 0 12 m2 = np.concatenate((m2,tmp.reshape(1, 80)),axis=0)
ちなみに、mは80x8000の配列です。
よろしくお願いします。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。