bundles / scipy 1.17.1 / scipy / _lib / array_api_extra / _lib / _at / at / _op
function
scipy._lib.array_api_extra._lib._at:at._op
Signature
def _op ( self , at_op : _AtOp , in_place_op : Callable[[Array, Array | complex], Array] | None , out_of_place_op : Callable[[Array, Array], Array] | None , y : Array | complex , / , copy : bool | None , xp : ModuleType | None ) → Array Summary
Implement all update operations.
Parameters
at_op: _AtOpMethod of JAX's Array.at[].
in_place_op: Callable[[Array, Array | complex], Array] | NoneIn-place operation to apply on mutable backends
x[idx] = in_place_op(x[idx], y)If None
x[idx] = yout_of_place_op: Callable[[Array, Array], Array] | NoneOut-of-place operation to apply when idx is a boolean mask and the backend doesn't support in-place updates
x = xp.where(idx, out_of_place_op(x, y), x)If None
x = xp.where(idx, y, x)y: array or complexRight-hand side of the operation.
copy: bool or NoneWhether to copy the input array. See the class docstring for details.
xp: array_namespace, optionalThe array namespace for the input array. Default: infer.
Returns
: ArrayUpdated
x.
Aliases
-
scipy.differentiate.xpx.at._op