<!--
{
  "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/View/subscript(scalarAt:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Subscript",
  "symbol" : {
    "kind" : "Instance Subscript",
    "modules" : [
      "Core AI",
      "CoreAI"
    ],
    "preciseIdentifier" : "s:13CoreAIRuntime7NDArrayV4ViewV8scalarAtxs11InlineArrayVyqd__SiG_tcSiRVd__luip"
  },
  "title" : "subscript(scalarAt:)"
}
-->

# subscript(scalarAt:)

Access the element at a multi-dimensional `index`.

```
subscript<let rank : Int>(scalarAt index: InlineArray<rank, Int>) -> Element { get }
```

## Parameters

`index`

The multi-dimensional index of the element to access. It must have the same count as rank of this view.

## Overview> Note: `rank` must be equal to the `rank` of this view.

---

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)