前言
numpy的索引,其实就是学习数组或矩阵的索引,类似于之前学过的数组a[2]
一维数组的索引
1 | a = np.arange(3, 15) |
矩阵的索引
1 | b = np.arange(3, 15).reshape((3, 4)) |
矩阵的迭代
1 | for row in b: |
numpy的索引,其实就是学习数组或矩阵的索引,类似于之前学过的数组a[2]
1 | a = np.arange(3, 15) |
1 | b = np.arange(3, 15).reshape((3, 4)) |
1 | for row in b: |
微信支付
支付宝