Calculate covariance matrix for complex data in two channels (no complex data type)
问题 I have complex-valued data given in 2 channels of a matrix (one is the real, one the imaginary part, so the matrix dimensions are (height, width, 2) , since Pytorch does not have native complex data types. I now want to calculate the covariance matrix. The stripped-down numpy calculation adapted for Pytorch is this: def cov(m, y=None): if m.ndimension() > 2: raise ValueError("m has more than 2 dimensions") if y.ndimension() > 2: raise ValueError('y has more than 2 dimensions') X = m if X