numpy module 2 -- Numpy Tutorial2

来源:互联网 发布:北京招聘淘宝模特兼职 编辑:程序博客网 时间:2024/06/09 23:18

1. More facility indexing

Except integers and slices, array can be indexed byarrays of integers and arrays of booleans.

(1)One dim

(2) multi dim


(3) Indexs more than one dim.


(4) broadcast from a num


(5) slice broadcast


(6) Naturally, we can put i1 andi2 in a sequence (say a list) and then do the indexing.


(7) However, we can not do this by putting i1 andi2 into an array.


(8) search the max value of time-dependent series


(9) 使用索引赋值


(10) You can use +=.


(11) Indexing with Boolean Arrays


(12) For each dimension of the array we give a 1D boolean array selecting the slices we want.


2. Simple Array Operations

(1) 转置和逆


(2) 单位阵和矩阵相乘


(3) 迹、特征值、解方程


0 0
原创粉丝点击