# expandDims

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

Insert a length-one axis.

```ds title="expandDims"
export function expandDims<T, const Rank: usize, const OutRank: usize>(tensor: Tensor<T, Rank>, axis: Axis, options?: TensorOutputOptions<T, OutRank> | undefined): Tensor<T, OutRank>
```

[language/library/src/tensor/ops.ds:87:93](https://github.com/destack-sh/destack/blob/main/language/library/src/tensor/ops.ds#L87-L93)
