---
title: "copyElements(from:)"
framework: coreai
role: symbol
role_heading: Instance Method
path: "coreai/ndarray/mutableview/copyelements(from:)"
---

# copyElements(from:)

Copies the elements from sequence into this view in row-major order.

## Declaration

```swift
@export(implementation) mutating func copyElements(from sequence: some Sequence<Element>)
```

## Parameters

- `sequence`: The sequence to be copied from.

## Discussion

Discussion The number of elements in sequence must be less than or equal to layout.scalarCount.

## See Also

### Writing data

- [copyElements(fromContentsOf:)](coreai/ndarray/mutableview/copyelements(fromcontentsof:).md)
