CustomKernel#
- class astropy.convolution.CustomKernel(array)[源代码]#
基类:
Kernel
从列表或数组创建筛选器内核。
- 参数:
- 加薪:
TypeError
或者不是数组。
KernelSizeError
如果数组大小是偶数。
实例
定义一维数组:
>>> from astropy.convolution.kernels import CustomKernel >>> import numpy as np >>> array = np.array([1, 2, 3, 2, 1]) >>> kernel = CustomKernel(array) >>> kernel.dimension 1
定义二维数组:
>>> array = np.array([[1, 1, 1], [1, 2, 1], [1, 1, 1]]) >>> kernel = CustomKernel(array) >>> kernel.dimension 2
属性摘要
筛选器内核数组。
属性文档
- array#
筛选器内核数组。