---
title: squeezeAxis
framework: coreml
role: symbol
role_heading: Type Property
path: coreml/mltensorrangeexpression/squeezeaxis
---

# squeezeAxis

Squeeze the tensor at the specified dimension.

## Declaration

```swift
static var squeezeAxis: any MLTensorRangeExpression { get }
```

## Discussion

Discussion For example: let x = MLTensor(randomNormal: [1, 3, 28, 28], scalarType: Float.self) let y = x[.squeezeAxis, ...] y.shape // is [3, 28, 28]

## See Also

### Expanding and squeezing the tensor

- [newAxis](coreml/mltensorrangeexpression/newaxis.md)
- [fillAll](coreml/mltensorrangeexpression/fillall.md)
