# map

Python API: `depthai_nodes.message.creators.map`

## Functions

### create_map_message

```python
def create_map_message(map_array: np.ndarray, min_max_scaling: bool = False) -> dai.beta.Map2D:
```

Create a float32 native map from a two-dimensional array.

Parameters

 * `map_array` (`np.ndarray`): NumPy array of shape `(H, W)`, `(1, H, W)`, or `(H, W, 1)`. A singleton leading or trailing axis is
   removed.
 * `min_max_scaling` (`bool`): Scale nonconstant maps to [0, 1] when true. Constant maps keep their original values.

Returns

 * `dai.beta.Map2D`: A native `Map2D` message containing the HW float32 map.

Raises

 * `ValueError`: If the input is not a NumPy array or has an unsupported shape.
