Skip to content

Commit e849868

Browse files
authored
Merge pull request #3304 from lpsinger/iterable
MAINT: Replace deprecated isiterable with np.iterable
2 parents 01ede50 + 4d48278 commit e849868

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

astroquery/simbad/core.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
import astropy.coordinates as coord
1414
from astropy.table import Table, Column, vstack
1515
import astropy.units as u
16-
from astropy.utils import isiterable, deprecated
16+
from astropy.utils import deprecated
1717
from astropy.utils.decorators import deprecated_renamed_argument
18+
import numpy as np
1819

1920
from astroquery.query import BaseVOQuery
2021
from astroquery.utils import commons
@@ -791,7 +792,7 @@ def query_region(self, coordinates, radius=2*u.arcmin, *,
791792
"centers. For larger queries, split your centers list.")
792793

793794
# `radius` as `str` is iterable, but contains only one value.
794-
if isiterable(radius) and not isinstance(radius, str):
795+
if np.iterable(radius) and not isinstance(radius, str):
795796
if len(radius) != len(center):
796797
raise ValueError(f"Mismatch between radii of length {len(radius)}"
797798
f" and center coordinates of length {len(center)}.")

0 commit comments

Comments
 (0)