Plot_window_differences.py 文件源码

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

项目:XYalign 作者: WilsonSayresLab 项目源码 文件源码
def transform_depth(numpy_array):
    """
    Performs custom version of log transformation on a numpy array. Where each
    value is processed to be equal to:
    initial_sign * abs(log10(abs(value)))

    Parameters
    ----------
    numpy_array : numpy array
        Array of values without NaNs

    Returns
    -------
    numpy array
    """
    signs = np.sign(numpy_array)
    step1 = np.absolute(numpy_array)
    id_zeros = step1 != 0
    step2 = np.absolute(np.log10(step1, where=id_zeros))
    return signs * step2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号