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
Plot_window_differences.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录