NumPy 学习笔记

目录

定义数组

将 list 或 tuple 转化为 NumPy 数组:

a = np.array([1, 2, 3, 4])

增加列

给数组增加新的一列,使用 c_ 连接两个数组:

c = np.c_[list_a, arry_b]

#python