<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreML",
  "identifier" : "/documentation/CoreML/MLTensor/all(alongAxes:keepRank:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Core ML",
      "CoreML"
    ],
    "preciseIdentifier" : "s:6CoreML8MLTensorV3all9alongAxes8keepRankACSid_SbtF::OverloadGroup"
  },
  "title" : "all(alongAxes:keepRank:)"
}
-->

# all(alongAxes:keepRank:)

Computes logical AND on elements across the specified axes of a tensor where the scalar type of the tensor is expected
to be Boolean.

```
func all(alongAxes axes: Int..., keepRank: Bool = false) -> MLTensor
```

## Parameters

`axes`

The axes to reduce.

`keepRank`

A Boolean indicating whether to keep the reduced axes or not. The default value is `false`.

## Return Value

The reduced Boolean tensor.

---

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)