<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#L7326-L7349) |

Gives a new shape to a tensor without changing its data.

#### View aliases


**Main aliases**

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

<br />

    tf.keras.ops.reshape(
        x, newshape
    )

<br />

<br />

<br />

| ## Args ||
|---|---|
| `x` | Input tensor. |
| `newshape` | The new shape should be compatible with the original shape. One shape dimension can be -1 in which case the value is inferred from the length of the array and remaining dimensions. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| The reshaped tensor. ||

<br />