<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#L2047-L2064) |

Clip (limit) the values in a tensor.

#### View aliases


**Main aliases**

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

<br />

    tf.keras.ops.clip(
        x, x_min, x_max
    )

Given an interval, values outside the interval are clipped to the
interval edges. For example, if an interval of `[0, 1]` is specified,
values smaller than 0 become 0, and values larger than 1 become 1.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor. |
| `x_min` | Minimum value. |
| `x_max` | Maximum value. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The clipped tensor. ||

<br />