# Scale

```python
class Scale
```

Struct for scale values.

## Attributes

| Name | Description |
| --- | --- |
| [`scale_list`](<#scale-list>) |  |
| [`scale`](<#scale>) |  |
| [`is_uniform`](<#is-uniform>) |  |
| [`zero_points`](<#zero-points>) | Per-channel zero points for asymmetric quantization. |
| [`zero_point`](<#zero-point>) | Uniform zero point for asymmetric quantization. |
| [`is_asymmetric`](<#is-asymmetric>) | Indicates whether asymmetric quantization is used. |

### scale\_list

```python
property scale_list: List[float]
```

### scale

```python
property scale: float
```

### is\_uniform

```python
property is_uniform: bool
```

### zero\_points

```python
property zero_points: List[int]
```

Per-channel zero points for asymmetric quantization.

### zero\_point

```python
property zero_point: int
```

Uniform zero point for asymmetric quantization.

### is\_asymmetric

```python
property is_asymmetric: bool
```

Indicates whether asymmetric quantization is used.

## Methods

| Name | Description |
| --- | --- |
| [`__init__`](<#init>) |  |
| [`from_cpp`](<#from-cpp>) |  |
| [`__getitem__`](<#getitem>) | Returns the scale value at the specified index. |
| [`__repr__`](<#repr>) |  |

### \_\_init\_\_

```python
def __init__(
    self,
    scale: float,
    is_uniform: bool,
    scale_list: List[float],
    zero_point: int = 0,
    is_asymmetric: bool = False,
    zero_points: Optional[List[int]] = None,
)
```

### from\_cpp

```python
def from_cpp(cls, _scale: _cQbRuntime.Scale)
```

### \_\_getitem\_\_

```python
def __getitem__(self, i: int) -> float
```

Returns the scale value at the specified index.

**Parameters**

- `i` *\[in\]* — Index.

**Returns**

[Scale](<https://docs.mobilint.com/runtime/en/v1.6/api/python/Scale/index.md>) value.

### \_\_repr\_\_

```python
def __repr__(self)
```
