Indexing functions

These functions allow to retrieve or modify array elements indexed by either integral arrays of indices or boolean mask arrays.

extract(condition, arr)

Returns the elements of an array that satisfies the condition.

place(arr, mask, vals)

Change elements of an array based on conditional and input values.

put(x, indices, vals[, axis, mode])

Puts values into an array along a given axis at given indices.

put_along_axis(x, indices, vals, /, *[, ...])

Puts elements into an array at the one-dimensional indices specified by indices along a provided axis.

take(x, indices[, axis, mode])

Takes elements from an array along a given axis at given indices.

take_along_axis(x, indices, /, *[, axis, mode])

Returns elements from an array at the one-dimensional indices specified by indices along a provided axis.