tidy3d.plugins.autograd.functions.smooth_max

Contents

tidy3d.plugins.autograd.functions.smooth_max#

class smooth_max[source]#

Bases:

Compute the smooth maximum of an array using temperature parameter tau.

Parameters:
  • x (np.ndarray) – Input array.

  • tau (float = 1.0) – Temperature parameter controlling smoothness. Larger values make the maximum smoother.

  • axis (Union[int, Tuple[int, ...], None] = None) – Axis or axes over which the smooth maximum is computed. By default, the smooth maximum is computed over the entire array.

Returns:

The smooth maximum of the input array.

Return type:

np.ndarray

Inherited Common Usage