cupyx.scipy.ndimage.generic_laplace#
- cupyx.scipy.ndimage.generic_laplace(input, derivative2, output=None, mode='reflect', cval=0.0, extra_arguments=(), extra_keywords=None)[source]#
使用提供的二阶导数函数进行多维拉普拉斯滤波。
- 参数:
input (cupy.ndarray) – 输入数组。
derivative2 (callable) –
一个函数或其他可调用对象,其签名如下,将为每个轴调用一次,
derivative2(input, axis, output, mode, cval, *extra_arguments, **extra_keywords)
其中
input
和output
是cupy.ndarray
,axis
是一个从0
到维度的整数,mode
、cval
、extra_arguments
、extra_keywords
是传递给此函数的值。output (cupy.ndarray, dtype or None) – 放置输出的数组。默认为与输入相同的 dtype。
mode (str) – 数组边界的处理方式根据给定的模式确定(
'reflect'
,'constant'
,'nearest'
,'mirror'
,'wrap'
)。默认为'reflect'
。cval (scalar) – 如果模式为
'constant'
,用于填充输入边缘以外的值。默认为0.0
。extra_arguments (sequence, optional) – 传递给
derivative2
的额外位置参数序列。extra_keywords (dict, optional) – 传递给
derivative2
的额外关键字参数字典。
- 返回:
滤波结果。
- 返回类型:
注意
当输出数据类型为整数(或未提供输出且输入为整数)时,由于中间结果的浮点舍入,结果可能与 SciPy 的结果不完全匹配。