Skip to content

Commit bdea8e1

Browse files
committed
MAINT: adding numpy version checking
1 parent a1860ca commit bdea8e1

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎pyvo/conftest.py‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99

1010
import numpy as np
11-
from astropy.version import version as astropy_version
11+
from astropy.utils import minversion
1212

1313
try:
1414
from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS
@@ -17,7 +17,9 @@
1717
ASTROPY_HEADER = False
1818

1919
# Keep this until we require numpy to be >=2.0
20-
np.set_printoptions(legacy="1.25")
20+
if minversion(np, "2.0.0.dev0+151"):
21+
np.set_printoptions(legacy="1.25")
22+
2123

2224
def pytest_configure(config):
2325
"""Configure Pytest with Astropy.

0 commit comments

Comments
 (0)