0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

np.arrayとnp.arangeの違い

Last updated at Posted at 2019-11-17

arrayとarangeの違いをメモ
arrayの後ろにはリストがくる

filename.rb
import numpy as np
np.array([1,2,3])
>>> 出力結果
array([1, 2, 3])

arrangeの後ろには数字を一つ指定し、その数字の個数分等間隔に増幅させた要素を作る。

filename.rb
import numpy as np
np.arange(4)
>>> 出力結果
array([0, 1, 2, 3])
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?