desc.grid.QuadratureGrid.replace_at_axis
- QuadratureGrid.replace_at_axis(x, y, copy=False, **kwargs)Source
Replace elements of
x
with elements ofy
at 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
x
is to be replaced by some value iny
, then settingcopy
to true ensures thatx
will not be modified in-place.
- Returns:
out (ndarray) – An array of size
grid.num_nodes
where elements at the indices corresponding to the axis of this grid match those ofy
and all others matchx
.