真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

python關(guān)于矩陣重復賦值覆蓋問題的解決方法-創(chuàng)新互聯(lián)

本文實例講述了python關(guān)于矩陣重復賦值覆蓋問題的解決方法。分享給大家供大家參考,具體如下:

創(chuàng)新互聯(lián)主營團風網(wǎng)站建設(shè)的網(wǎng)絡公司,主營網(wǎng)站建設(shè)方案,APP應用開發(fā),團風h5小程序開發(fā)搭建,團風網(wǎng)站營銷推廣歡迎團風等地區(qū)企業(yè)咨詢
import itertools
import numpy as np
comb = list(itertools.combinations(list(range(regions)), 2))
bands_info = []
coeff = np.zeros([bands, len(comb)])
for cla in range(classes):
  class_info = data[:,cla*bands*regions:(cla+1)*bands*regions]
  for bs in range(bands):
    n = bs*regions
    for i in range(len(comb)):
      index1 = comb[i][0]+n
      index2 = comb[i][1]+n
      part1 = class_info[:, index1]
      part2 = class_info[:, index2]
      coeff[bs, i] = (np.corrcoef(part1, part2))[0, 1]
  bands_info.append(coeff.reshape([1,-1]))
coeff_info = np.vstack((bands_info[0], bands_info[1], bands_info[2],bands_info[3]))


新聞名稱:python關(guān)于矩陣重復賦值覆蓋問題的解決方法-創(chuàng)新互聯(lián)
文章分享:http://weahome.cn/article/phjoe.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部