19/08/25 10:40:17.72 9mosJQ5t.net
>>293
サイズが予め分かっているならnp.emptyかnp.zerosで先にそのサイズで作成する
x = np.empty(shape=(10,2))
としてから
x[i] = [i, i*i]
サイズが予め決まっていない場合は、先にリストで処理して最後にnp.arrayにする
x = []
for i in range( 10 ):
x = x.append([i, i*i])
で入れたあと
x = np.array(x)