<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/keras-team/keras/tree/v3.15.1/keras/src/ops/numpy.py#L7942-L7962) |

Select values from `x` at the 1-D `indices` along the given axis.

#### View aliases


**Main aliases**

[`tf.keras.ops.numpy.take_along_axis`](https://www.tensorflow.org/api_docs/python/tf/keras/ops/take_along_axis)

<br />

    tf.keras.ops.take_along_axis(
        x, indices, axis=None
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Source tensor. |
| `indices` | The indices of the values to extract. |
| `axis` | The axis over which to select values. By default, the flattened input tensor is used. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The corresponding tensor of values. ||

<br />