---
title: IsExpandIndex
description: "基于补维后的shape，判断指定的index轴是否为补维轴。"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/maintenref/basicdataapi/atlasopapi_07_00066.html
sourcePath: /source/zh/canncommercial/900/maintenref/basicdataapi/atlasopapi_07_00066.html
indexId: 020d3385acd58f664fba0276ead67dfa9af9522c3fab02ce6318628c10da4d4678
---
# IsExpandIndex

#### 函数功能

基于补维后的shape，判断指定的index轴是否为补维轴。


#### 函数原型

```
bool IsExpandIndex(const AxisIndex index) const
```


#### 参数说明

| 参数 | 输入/输出 | 说明 |
| --- | --- | --- |
| index | 输入 | 指定轴的索引。 |


#### 返回值说明

- true代表指定的轴为补维轴。
- false代表指定的轴为原始轴。


#### 约束说明

无。


#### 调用示例

```
ExpandDimsType type1("1001");
bool is_expand_index0 = type1.IsExpandIndex(0); // true
bool is_expand_index1 = type1.IsExpandIndex(1); // false
```
