Skip to content

Commit

Permalink
allow slight rounding deviations in doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
observingClouds committed Nov 14, 2024
1 parent a8eacc4 commit 5946210
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mllam_data_prep/ops/projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,14 @@ def get_latitude_longitude_from_projection(
Examples
--------
>>> import numpy as np
>>> proj = pyproj.CRS.from_cf({"crs_wkt":"EPSG:3857"})
>>> coords = (500000, 4649776)
>>> get_latitude_longitude_from_projection(proj, coords)
(38.496303121059576, 4.491576420597607)
>>> np.round(get_latitude_longitude_from_projection(proj, coords),3)
array([38.496, 4.492])
>>> coords = ([400000, 500000], [3649776, 4649776])
>>> get_latitude_longitude_from_projection(proj, coords)
([31.13101769562677, 38.496303121059576], [3.5932611364780858, 4.491576420597607])
>>> np.round(get_latitude_longitude_from_projection(proj, coords),3)
array([31.131, 38.496], [3.593, 4.492])
"""
if output_proj is None:
output_proj = pyproj.CRS("EPSG:4326")
Expand Down

0 comments on commit 5946210

Please sign in to comment.