0
# Shape Operations
1
2
Functions for manipulating array shapes, dimensions, and broadcasting with full metadata preservation.
3
4
## Capabilities
5
6
### Shape Manipulation
7
8
Core functions for changing array structure while preserving data and metadata.
9
10
```python { .api }
11
def broadcast(x, *, dims=None, shape=None):
12
"""Broadcast variable to specified shape"""
13
14
def transpose(x, dims=None):
15
"""Reorder dimensions"""
16
17
def squeeze(x, dim=None):
18
"""Remove dimensions of size 1"""
19
20
def flatten(x, dims, to):
21
"""Flatten multiple dimensions into one"""
22
23
def fold(x, dim, dims, shape):
24
"""Fold dimension into multiple dimensions"""
25
26
def concat(x, dim):
27
"""Concatenate along dimension"""
28
```