---
title: length
framework: ML Compute
role: symbol
role_heading: Instance Property
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: mlcompute/mlctensordata/length
---

# length

The number of bytes you choose to hold for this tensor data instance.

## Declaration

```swift
var length: Int { get }
```

## Discussion

Discussion important: This value must not exceed length of bytes.

## See Also

### Inspecting Tensor Data

- [bytes](mlcompute/mlctensordata/bytes.md)
