blue_sampler.tile
- blue_sampler.tile(x, repeat, flatoutput=True)[source]
Tile points on the unit torus to cover [0, 1)^D periodically.
Each of the repeat**D copies of x is rescaled by 1/repeat and shifted to its own sub-cube, so that the copies together pave the unit torus again. For example in 2D with repeat=2: tile (0, 0) holds x/2, tile (1, 1) holds x/2 + 0.5, etc.
- Parameters:
x (
NDArray) – Points in [0, 1)^D (unit torus).repeat (
int) – Number of repetitions per axis. The output therefore contains Nfinal = N * repeat**D points.flatoutput (
bool) – If True, reshape the output to (Nfinal, D). If False, keep the tile structure as leading axes.
- Returns:
Tiled version of x, periodized over [0, 1)^D.
- Return type:
NDArray