# map_output

Python API: `depthai_nodes.node.parsers.utils.map_output`

## Functions

| Name | Description |
| --- | --- |
| [`compute_map_output`](https://docs.luxonis.com/software-v3/ai-inference/inference/depthai-nodes/depthai-nodes-api-reference/node/parsers/utils/map_output.md#map_output-Functions-compute_map_output) | Remove singleton batch or channel axes from a numeric map. |

### function `compute_map_output`

```python
def compute_map_output(map_tensor: np.ndarray) -> np.ndarray
```

Remove singleton batch or channel axes from a numeric map.

Args

| Name | Type | Description | Default |
| --- | --- | --- | --- |
| `map_tensor` | `np.ndarray` | HW map, a map with leading singleton axes, or an HW1 map. | required |

Returns

| Type | Description |
| --- | --- |
| `np.ndarray` | A two-dimensional array. Values and dtype are preserved; the result may share input storage. |

Raises

| Type | Description |
| --- | --- |
| `ValueError` | If the input cannot be reduced to an HW map through supported singleton axes. |
