From 1ce3e7547c64845b882b5b59739510b87d1fbe91 Mon Sep 17 00:00:00 2001 From: Alexey Pechnikov Date: Thu, 26 Sep 2024 01:52:50 +0700 Subject: [PATCH] Fix for Numpy 2 compatibility --- pygmtsar/pygmtsar/Stack_trans.py | 4 ++-- pygmtsar/setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmtsar/pygmtsar/Stack_trans.py b/pygmtsar/pygmtsar/Stack_trans.py index de923a4..db36e6c 100644 --- a/pygmtsar/pygmtsar/Stack_trans.py +++ b/pygmtsar/pygmtsar/Stack_trans.py @@ -198,8 +198,8 @@ def trans_block(lats, lons, amin=-np.inf, amax=np.inf, rmin=-np.inf, rmax=np.inf #print ('borders', borders) # process the area - lats = np.linspace(dem.lat[0], dem.lat[-1], azi_steps) - lons = np.linspace(dem.lon[0], dem.lon[-1], rng_steps) + lats = np.linspace(dem.lat.values[0], dem.lat.values[-1], azi_steps) + lons = np.linspace(dem.lon.values[0], dem.lon.values[-1], rng_steps) #print ('lats', lats, 'lons', lons) #print ('lats.size', lats.size, 'lons.size', lons.size) diff --git a/pygmtsar/setup.py b/pygmtsar/setup.py index 68733b0..c362a02 100644 --- a/pygmtsar/setup.py +++ b/pygmtsar/setup.py @@ -45,7 +45,7 @@ def get_version(): 'pygmtsar': ['data/geoid_egm96_icgem.grd','data/google_colab.sh'], }, install_requires=['xarray>=2024.1.0', - 'numpy<2', + 'numpy', 'numba', 'pandas>=2.2', 'geopandas',