diff --git a/conftest.py b/conftest.py index 56293bf880..1ce60f20af 100644 --- a/conftest.py +++ b/conftest.py @@ -1,9 +1,17 @@ # Licensed under a 3-clause BSD style license - see LICENSE.rst +import numpy as np +from astropy.utils import minversion + from pytest_astropy_header.display import (PYTEST_HEADER_MODULES, TESTED_VERSIONS) +# Keep this until we require numpy to be >=2.0 +if minversion(np, "2.0.0.dev0+git20230726"): + np.set_printoptions(legacy="1.25") + + def pytest_configure(config): config.option.astropy_header = True