IT練習ノート

IT関連で調べたこと(実際は嵌ったこと)を書いています。

2015-08-16から1日間の記事一覧

Pythonの配列の計算

numpyを使う。 普通の配列の場合は直接演算はできない。 >>> a = [1,2,3] >>> b = [4,5,6] >>> a -b Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: unsupported operand type(s) for -: 'list' and 'list' numpyを利用すると計算がで</module></stdin>…