desc.grid.ConcentricGrid.replace_at_axis
- ConcentricGrid.replace_at_axis(x, y, copy=False, **kwargs)Source
Replace elements of
xwith elements ofyat the axis of grid.- Parameters:
x (array-like) – Values to selectively replace. Should have length
grid.num_nodes.y (array-like) – Replacement values. Should broadcast with arrays of size
grid.num_nodes. Can also be a function that returns such an array. Additional keyword arguments are then input toy.copy (bool) – If some value of
xis to be replaced by some value iny, then settingcopyto true ensures thatxwill not be modified in-place.
- Returns:
out (ndarray) – An array of size
grid.num_nodeswhere elements at the indices corresponding to the axis of this grid match those ofyand all others matchx.