<!--
{
  "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/MutableRawView/mutableBytes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Core AI",
      "CoreAI"
    ],
    "preciseIdentifier" : "s:13CoreAIRuntime7NDArrayV14MutableRawViewV12mutableBytess0dE4SpanVvp"
  },
  "title" : "mutableBytes"
}
-->

# mutableBytes

A mutable span over the backing bytes of this tensor.

```
@export(implementation) var mutableBytes: MutableRawSpan { 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/MutableRawView/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)