---
title: rank
framework: coreai
role: symbol
role_heading: Instance Property
path: coreai/ndarraydescriptor/rank
---

# rank

The number of dimensions in the array.

## Declaration

```swift
var rank: Int { get }
```

## See Also

### Inspecting descriptor properties

- [shape](coreai/ndarraydescriptor/shape.md)
- [scalarType](coreai/ndarraydescriptor/scalartype.md)
- [hasDynamicShape](coreai/ndarraydescriptor/hasdynamicshape.md)
