tools_fri_doa_plane.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:FRIDA 作者: LCAV 项目源码 文件源码
def extract_off_diag(mtx):
    """
    extract off diagonal entries in mtx.
    The output vector is order in a column major manner.
    :param mtx: input matrix to extract the off diagonal entries
    :return:
    """
    # we transpose the matrix because the function np.extract will first flatten the matrix
    # withe ordering convention 'C' instead of 'F'!!
    extract_cond = np.reshape((1 - np.eye(*mtx.shape)).T.astype(bool), (-1, 1), order='F')
    return np.reshape(np.extract(extract_cond, mtx.T), (-1, 1), order='F')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号