Skip to Content
Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習
book

Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

by Jake VanderPlas, 菊池 彰
May 2018
Intermediate to advanced
556 pages
13h 21m
Japanese
O'Reilly Japan, Inc.
Content preview from Pythonデータサイエンスハンドブック ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習
2.2
NumPy
配列の基礎
41
2.1.6
NumPy
の標準データ型
NumPy
配列の値は
1
つの型を持つため、型とその制限に関する詳細な知識は重要です。
NumPy
C
言語で実装されているため、
NumPy
の型は
C
言語、
Fortran
、およびその他の関連する言語の
ユーザにはよく知られています。
標準の
NumPy
データタイプを 2-1 に示します。配列を作成するときには、文字列を使用して
配列を指定できます。
np.zeros(10, dtype='int16')
または、関連する
NumPy
オブジェクトを使用します。
np.zeros(10, dtype=np.int16)
表2-1 標準NumPy データ型
データ型 説明
bool_
論理型(
True
または
False
)。
1
バイトに格納される。
int_
デフォルトの整数型(
C
言語の
long
と同等。通常
int64
int32
)。
intc
C
言語の
int
と同じ(通常
int64
int32
)。
intp
インデクスに使用するための整数(
C
言語の
ssize_t
と同等。通常
int64
int32
)。
int8
バイト(−
128
から
127
)。
int16
整数(−
32768
から
32767
)。
int32
整数(−
2147483648
から
2147483647
)。
int64
整数(−
9223372036854775808
から
9223372036854775807
)。
uint8
符号なし整数(
0
から
255
)。
uint16
符号なし整数(
0
から
65535
)。
uint32
符号なし整数(
0
から
4294967295 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Pythonデータサイエンスハンドブック 第2版 ―Jupyter、NumPy、pandas、Matplotlib、scikit-learnを使ったデータ分析、機械学習

Jake VanderPlas, 菊池 彰
初めてのGraphQL ―Webサービスを作って学ぶ新世代API

初めてのGraphQL ―Webサービスを作って学ぶ新世代API

Eve Porcello, Alex Banks, 尾崎 沙耶, あんどうやすし

Publisher Resources

ISBN: 9784873118413Other