---
title: isScalar
framework: coreml
role: symbol
role_heading: Instance Property
path: coreml/mltensor/isscalar
---

# isScalar

A Boolean value indicating whether the tensor is a scalar (when the rank is equal to 0) or not.

## Declaration

```swift
var isScalar: Bool { get }
```

## See Also

### Accessing tensor properties

- [rank](coreml/mltensor/rank.md)
- [scalarCount](coreml/mltensor/scalarcount.md)
- [scalarType](coreml/mltensor/scalartype.md)
- [shape](coreml/mltensor/shape.md)
