---
title: "expandingShape(at:)"
framework: coreml
role: symbol
role_heading: Instance Method
path: "coreml/mltensor/expandingshape(at:)"
---

# expandingShape(at:)

Returns a shape-expanded tensor with a dimension of 1 inserted at the specified shape indices.

## Declaration

```swift
func expandingShape(at axes: Int...) -> MLTensor
```

## Parameters

- `axes`: The axes at which to expand the shape.

## Discussion

Discussion For example: let x = MLTensor(shape: [2], scalars: [1, 2], scalarType: Float.self) let y = x.expandingShape(at: 0) y.shape // is [1, 2]

## See Also

### Accessing the extended tensor, sign and reciprocal

- [bandPart(lowerBandCount:upperBandCount:)](coreml/mltensor/bandpart(lowerbandcount:upperbandcount:).md)
- [tiled(multiples:)](coreml/mltensor/tiled(multiples:).md)
- [sign()](coreml/mltensor/sign().md)
- [reciprocal()](coreml/mltensor/reciprocal().md)
