【发布时间】:2022-01-12 21:34:34
【问题描述】:
我有两个数组:900x421 和 900x147。我需要关联这些数组中的所有列,以便输出为 421x147。在 Matlab 函数 corr() 中可以做到这一点,但我在 python 中找不到相同的函数。
【问题讨论】:
-
你看到了吗:numpy.corrcoef?
-
是的,但它给出了一个错误:
all the input array dimensions for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 421 and the array at index 1 has size 147 -
转置输入
-
它给出了同样的错误
-
如果两个输入都被转置,我会得到一个形状为
568的数组,但我需要一个421x147的数组
标签: python arrays correlation