<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -",
    "watchOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreAI",
  "identifier" : "/documentation/CoreAI/NDArray/RawView/bytes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core AI",
      "CoreAI"
    ],
    "preciseIdentifier" : "s:13CoreAIRuntime7NDArrayV7RawViewV5bytess0D4SpanVvp"
  },
  "title" : "bytes"
}
-->

# bytes

A span over the backing bytes of this tensor.

```
var bytes: RawSpan { get }
```

## Discussion> Note: When accessing the bytes directly you are responsible for interpreting the layout of the tensor according
> to the `strides` property of this view. This means you must either ensure the logical elements are contiguous, or dynamically
> handle nontrivial striding.
> If the view has an ``doc://com.apple.coreai/documentation/CoreAI/NDArray/RawView/interleaveLayout``, the strides for that dimension are block strides
> and must be interpreted accordingly — see ``doc://com.apple.coreai/documentation/CoreAI/NDArray/InterleaveLayout-swift.struct``.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)