Skip to content

Commit

Permalink
ecef2geodetic: scalar-in, scalar-out
Browse files Browse the repository at this point in the history
fixes #93
  • Loading branch information
scivision committed Jan 29, 2024
1 parent 01ced36 commit dc652b8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/pymap3d/ecef.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,12 @@ def ecef2geodetic(
if deg:
lat = degrees(lat)
lon = degrees(lon)
else:
try:
lat = lat.squeeze()[()]
# ensures scalar in, scalar out
except AttributeError:
pass

return lat, lon, alt

Expand Down

0 comments on commit dc652b8

Please sign in to comment.