PyAutoArray is the low-level data structures and numerical utilities package for the PyAuto ecosystem. It provides grids, masks, arrays, datasets, inversions, and the decorator system used throughout PyAutoGalaxy and PyAutoLens.
pip install -e ".[dev]"python -m pytest test_autoarray/
python -m pytest test_autoarray/structures/test_arrays.py
python -m pytest test_autoarray/structures/test_arrays.py -sNUMBA_CACHE_DIR=/tmp/numba_cache MPLCONFIGDIR=/tmp/matplotlib python -m pytest test_autoarray/- Data structures:
Array2D,Grid2D,Grid2DIrregular,VectorYX2D— all inherit fromAbstractNDArray - Decorator system (
structures/decorators/):@to_array,@to_grid,@to_vector_yx,@transform— ensures output type matches input grid type - Datasets:
Imaging,Interferometer— containers for observational data - Inversions (
inversion/): sparse linear algebra for source reconstruction via pixelizations - Operators:
Convolver(PSF convolution), over-sampling utilities
- The
xpparameter pattern controls NumPy vs JAX:xp=np(default) orxp=jnp - Autoarray types are not JAX pytrees — they cannot be returned from
jax.jitfunctions - Decorated functions must return raw arrays, not autoarray wrappers
- All files must use Unix line endings (LF)
- Format with
black autoarray/
- Read the issue description and any linked plan.
- Identify affected files and write your changes.
- Run the full test suite:
python -m pytest test_autoarray/ - Ensure all tests pass before opening a PR.
- If changing public API, note the change in your PR description — downstream packages (PyAutoGalaxy, PyAutoLens) and workspaces may need updates.