Skip to content

Commit aedfc07

Browse files
committed
geodetic2isometric, lookAtSpheroid: remove squeeze
1 parent 3d886bf commit aedfc07

5 files changed

Lines changed: 4 additions & 11 deletions

File tree

src/pymap3d/latitude.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,10 +238,7 @@ def geodetic2isometric(geodetic_lat: FloatArray, ell: Ellipsoid | None = None, d
238238
if deg:
239239
isometric_lat = degrees(isometric_lat)
240240

241-
try:
242-
return isometric_lat.squeeze()[()]
243-
except AttributeError:
244-
return isometric_lat
241+
return isometric_lat
245242

246243

247244
def isometric2geodetic(isometric_lat: FloatLike, ell: Ellipsoid | None = None, deg: bool = True):
@@ -647,4 +644,3 @@ def parametric2geodetic(parametric_lat: FloatLike, ell: Ellipsoid | None = None,
647644
geodetic_lat = atan(tan(parametric_lat) / sqrt(1 - (ell.eccentricity) ** 2))
648645

649646
return degrees(geodetic_lat) if deg else geodetic_lat
650-

src/pymap3d/los.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,4 @@ def lookAtSpheroid(
114114
# %% cartesian to ellipsodal
115115
lat, lon, _ = ecef2geodetic(x + d * u, y + d * v, z + d * w, deg=deg)
116116

117-
try:
118-
return lat.squeeze()[()], lon.squeeze()[()], d.squeeze()[()]
119-
except AttributeError:
120-
return lat, lon, d
117+
return lat, lon, d

src/pymap3d/tests/test_eci.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
ECEF = [-5762640.0, -1682738.0, 3156028.0]
1414
UTC = datetime.datetime(2019, 1, 4, 12, tzinfo=datetime.timezone.utc)
1515

16+
1617
@pytest.mark.parametrize("force_non_astropy", [True, False])
1718
def test_eci2ecef(force_non_astropy):
1819
ecef = pm.eci2ecef(*ECI, UTC, force_non_astropy=force_non_astropy)

src/pymap3d/tests/test_nvector_ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import pytest
1515
from pytest import approx
1616

17-
1817
# Mean Earth radius (equal-volume sphere)
1918
R = 6371000.8
2019

src/pymap3d/tests/test_vincenty_vreckon.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_vreckon_unit(deg, lat, lon, srange, az, lato, lono):
4444

4545

4646
def test_az_vector():
47-
np =pytest.importorskip("numpy")
47+
np = pytest.importorskip("numpy")
4848
az = np.array(az1)
4949
a, b = vincenty.vreckon(*ll0, sr1[0], az)
5050
assert a == approx(lat2)

0 commit comments

Comments
 (0)