tidy3d.plugins.autograd.functions.threshold#
- class threshold[source]#
- Bases: - Apply a threshold to an array, setting values below the threshold to vmin and values above to vmax. - Parameters:
- array (NDArray) β The input array to be thresholded. 
- vmin (float, optional) β The value to assign to elements below the threshold. Default is 0.0. 
- vmax (float, optional) β The value to assign to elements above the threshold. Default is 1.0. 
- level (Union[float, None], optional) β The threshold level. If None, the threshold is set to the midpoint between vmin and vmax. Default is None. 
 
- Returns:
- The thresholded array. 
- Return type:
- NDArray 
 - Inherited Common Usage