---
title: mutableBytes
framework: coreai
role: symbol
role_heading: Instance Property
path: coreai/ndarray/mutablerawview/mutablebytes
---

# mutableBytes

A mutable span over the backing bytes of this tensor.

## Declaration

```swift
@export(implementation) var mutableBytes: MutableRawSpan { mutating get }
```

## Discussion

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 interleaveLayout, the strides for that dimension are block strides and must be interpreted accordingly — see NDArray.InterleaveLayout.
