core.py 文件源码

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

项目:motif 作者: rabitt 项目源码 文件源码
def _sort_contours(self, index, times, freqs, salience):
        """Sort contours by index and time.

        Parameters
        ----------
        index : np.array
            array of contour numbers
        times : np.array
            array of contour times
        freqs : np.array
            array of contour frequencies
        salience : np.array
            array of contour salience values

        Returns
        -------
        index_sorted : np.array
            Pruned array of contour numbers
        times_sorted : np.array
            Pruned array of contour times
        freqs_sorted : np.array
            Pruned array of contour frequencies
        salience_sorted : np.array
            Pruned array of contour salience values

        """
        sort_idx = np.lexsort((times, index))

        return (
            index[sort_idx], times[sort_idx], freqs[sort_idx],
            salience[sort_idx]
        )


###############################################################################
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号