tidy3d.plugins.autograd.functions.add_at

Contents

tidy3d.plugins.autograd.functions.add_at#

class add_at[source]#

Bases:

Add values to specified indices of an array.

This function creates a copy of the input array x, adds the values from y to the specified indices indices_x, and returns the modified array.

Parameters:
  • x (np.ndarray) – Input array to which values will be added.

  • indices_x (tuple) – Indices of x where values from y will be added.

  • y (np.ndarray) – Values to add to the specified indices of x.

Returns:

The modified array with values added at the specified indices.

Return type:

np.ndarray

Inherited Common Usage