# numpy 的引用,数组生成,运算操作
import numpy as np
a = np.eye(5) # 生成 5 行 5 列的数组,对角线都是1 ,其它位置是 0
print(type(a),a)
# b = np.ones(5)# 生成一组全是 1 的数组
b = np.ones([5,5]) # 生成 5 行 5 列全是 1 的数组
print(b.shape) # 展示数组维度
print(b)
c = a + b
print(type(c)) # <class 'numpy.ndarray'>
print(c.shape) # (5, 5)
print(c)