tidy3d.plugins.autograd.functions.grey_erosion#
- class grey_erosion[source]#
- Bases: - Perform grey erosion on an array. - Parameters:
- array (np.ndarray) β The input array to perform grey dilation on. 
- size (Union[Union[int, Tuple[int, int]], None], optional) β The size of the structuring element. If None, structure must be provided. Default is None. 
- structure (Union[np.ndarray, None], optional) β The structuring element. If None, size must be provided. Default is None. 
- mode (_pad_modes, optional) β The padding mode to use. Default is βreflectβ. 
- maxval (float, optional) β Value to assume for infinite elements in the kernel. Default is 1e4. 
 
- Returns:
- The result of the grey dilation operation. 
- Return type:
- np.ndarray 
- Raises:
- ValueError β If both size and structure are None. 
 - Inherited Common Usage