<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -",
    "macOS: 27.0.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "USDKit",
  "identifier" : "/documentation/USDKit/USDArray/init(_:)-1re5y",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "USDKit"
    ],
    "preciseIdentifier" : "s:6USDKit8USDArrayVyACyxGqd__c7ElementQyd__RszSTRd__lufc"
  },
  "title" : "init(_:)"
}
-->

# init(_:)

Creates an array containing the elements of `s`.

```
init(_ s: some Sequence<Element>)
```

## Discussion

The backing C++ storage is reserved up front from the sequence’s
`underestimatedCount`, so the common case allocates once rather than
reallocating repeatedly while appending. `underestimatedCount` is exact
and `O(1)` for collections such as `Array`; for sequences whose count
isn’t known it is a lower bound (possibly zero) used purely as a
reservation hint, which avoids a second traversal just to count.

---

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)