Skip to content

Commit d10cd30

Browse files
Merge pull request #61 from nsidc/56-update-numpy-pyproj
Update numpy and pyproj
2 parents e6e33f3 + ec8f78b commit d10cd30

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ classifiers = [
2424
"Typing :: Typed",
2525
]
2626
dependencies = [
27-
"numpy ~=2.0.1",
27+
"numpy >=2.0.1",
2828
"earthaccess >=0.10.0",
2929
"pandas >=2.2",
3030
"h5py >=3.11",
3131
"gps-timemachine >=1.1.4",
32-
"pyproj ~=3.6.1",
32+
"pyproj >=3.6.1",
3333
"shapely >=2.0.5",
3434
"pandera[mypy] ~=0.23.0",
3535
"pydantic >=2.8.2",

tests/unit/test_itrf_converter.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ def test_transform_itrf():
4040
# https://github.com/nsidc/NSIDC-Data-Tutorials/blob/a35203f18841456d258fac3a11dc04f44f839d9d/notebooks/iceflow/corrections.ipynb
4141
assert result.latitude.to_numpy()[0] == 69.99999974953995
4242
assert result.longitude.to_numpy()[0] == -50.0000001319163
43-
assert result.elevation.to_numpy()[0] == 1.0052761882543564
43+
# Rounding to 8 decimals in a field assumed to be measured in meters is 10nm accuracy!
44+
# This rounding became necessary when pyproj updated to a newer than 3.6.1
45+
# version, leading to a difference of ~1nm in the resulting calculation.
46+
assert np.round(result.elevation.to_numpy()[0], 8) == np.round(
47+
1.0052761882543564, 8
48+
)
4449

4550

4651
def _itrf_cart_coords_to_wgs84(x, y, z):

0 commit comments

Comments
 (0)