数组索引报错IndexError: arrays used as indices must be of integer (or boolean) type 在索引后加上.astype(‘int64’) 如: self.matrix[p.astype('int64'), t.astype('int64')] += 1