# reshape

`import { reshape } from "destack:tensor";`

Reshape `tensor` to `shape`.

```ds title="reshape"
export declare function reshape<T, const Rank: usize, const OutRank: usize>(tensor: Tensor<T, Rank>, shape: Shape<OutRank>, options?: TensorOutputOptions<T, OutRank> | undefined): Tensor<T, OutRank>
```

[language/library/src/tensor/ops.ds:38:42](https://github.com/destack-sh/destack/blob/main/language/library/src/tensor/ops.ds#L38-L42)
