LoginSignup
5
6

More than 5 years have passed since last update.

numpyの練習1

Last updated at Posted at 2012-12-06

numpyのオブジェクトを作る

import numpy
a = numpy.array([1,2,3,4,5])
b = numpy.array([6,7,8,9,10])

numpyで合計,平均,分散,標準偏差を出す
numpy.sum(a)
numpy.average(a)
numpy.var(a)
numpy.std(a)

numpyに要素を追加
numpy.append(a,6)

→ numpy.array([1,2,3,4,5,6])を返す(返り値として返ってくる)

5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6