bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / _external / array_api_extra / _lib / _at / at / _op
function
scipy._external.array_api_extra._lib._at:at._op
source: build-install/usr/lib/python3.14/site-packages/scipy/_external/array_api_extra/_lib/_at.py:223
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: ArrayNamespace | None) → ArraySummary
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