From 87ca8f389c712e49da76b0e6ced7c986bbd2631c Mon Sep 17 00:00:00 2001 From: Wolfgang Preimesberger Date: Mon, 17 Jun 2024 16:01:07 +0200 Subject: [PATCH] Fix for new numpy version (#85) * Fix for new numpy version * Fix for new numpy version --- .github/workflows/build.yml | 4 +- environment_pinned.yml | 440 +++++++++++++++++------------ src/pygeogrids/grids.py | 10 +- src/pygeogrids/nearest_neighbor.py | 4 +- 4 files changed, 272 insertions(+), 186 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ae3cb68..c9b4ac6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,8 +10,8 @@ on: push: pull_request: workflow_dispatch: - #schedule: - # - cron: '0 0 * * *' # daily + schedule: + - cron: '0 0 * * *' # daily jobs: build: diff --git a/environment_pinned.yml b/environment_pinned.yml index 89c6247..a28c4a2 100644 --- a/environment_pinned.yml +++ b/environment_pinned.yml @@ -5,215 +5,301 @@ channels: dependencies: - _libgcc_mutex=0.1=conda_forge - _openmp_mutex=4.5=2_gnu - - asttokens=2.2.1=pyhd8ed1ab_0 - - backcall=0.2.0=pyh9f0ad1d_0 - - backports=1.0=pyhd8ed1ab_3 - - backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0 - - blosc=1.21.3=hafa529b_0 - - boost-cpp=1.78.0=h5adbc97_2 - - brotlipy=0.7.0=py39hb9d737c_1005 - - bzip2=1.0.8=h7f98852_4 - - c-ares=1.18.1=h7f98852_0 - - ca-certificates=2023.01.10=h06a4308_0 - - cairo=1.16.0=ha61ee94_1014 - - certifi=2022.12.7=py39h06a4308_0 - - cffi=1.15.1=py39he91dace_3 - - cfitsio=4.2.0=hd9d235c_0 - - cftime=1.6.2=py39h2ae25f5_1 - - charset-normalizer=3.1.0=pyhd8ed1ab_0 - - comm=0.1.3=pyhd8ed1ab_0 - - cryptography=40.0.1=py39h079d5ae_0 - - curl=7.88.1=hdc1c0ab_1 - - debugpy=1.6.7=py39h227be39_0 + - alsa-lib=1.2.12=h4ab18f5_0 + - asttokens=2.4.1=pyhd8ed1ab_0 + - attr=2.5.1=h166bdaf_1 + - aws-c-auth=0.7.22=h9137712_5 + - aws-c-cal=0.6.15=h88a6e22_0 + - aws-c-common=0.9.19=h4ab18f5_0 + - aws-c-compression=0.2.18=h83b837d_6 + - aws-c-event-stream=0.4.2=h0cbf018_13 + - aws-c-http=0.8.2=h360477d_2 + - aws-c-io=0.14.9=h2d549f9_2 + - aws-c-mqtt=0.10.4=hf85b563_6 + - aws-c-s3=0.5.10=h679ed35_3 + - aws-c-sdkutils=0.1.16=h83b837d_2 + - aws-checksums=0.1.18=h83b837d_6 + - aws-crt-cpp=0.26.12=h8bc9c4d_0 + - aws-sdk-cpp=1.11.329=hf74b5d1_5 + - azure-core-cpp=1.11.1=h91d86a7_1 + - azure-identity-cpp=1.6.0=hf1915f5_1 + - azure-storage-blobs-cpp=12.10.0=h00ab1b0_1 + - azure-storage-common-cpp=12.5.0=h94269e2_4 + - blosc=1.21.5=hc2324a3_1 + - brotli=1.1.0=hd590300_1 + - brotli-bin=1.1.0=hd590300_1 + - bzip2=1.0.8=hd590300_5 + - c-ares=1.28.1=hd590300_0 + - ca-certificates=2024.6.2=hbcca054_0 + - cairo=1.18.0=h3faef2a_0 + - cartopy=0.23.0=py312h1d6d2e6_1 + - certifi=2024.6.2=pyhd8ed1ab_0 + - cfitsio=4.4.0=hbdc6101_1 + - comm=0.2.2=pyhd8ed1ab_0 + - contourpy=1.2.1=py312h8572e83_0 + - cycler=0.12.1=pyhd8ed1ab_0 + - dbus=1.13.6=h5008d03_3 + - debugpy=1.8.1=py312h30efb56_0 - decorator=5.1.1=pyhd8ed1ab_0 - - executing=1.2.0=pyhd8ed1ab_0 - - expat=2.5.0=hcb278e6_1 + - exceptiongroup=1.2.0=pyhd8ed1ab_2 + - executing=2.0.1=pyhd8ed1ab_0 + - expat=2.6.2=h59595ed_0 + - fmt=10.2.1=h00ab1b0_0 - font-ttf-dejavu-sans-mono=2.37=hab24e00_0 - font-ttf-inconsolata=3.000=h77eed37_0 - font-ttf-source-code-pro=2.038=h77eed37_0 - - font-ttf-ubuntu=0.83=hab24e00_0 + - font-ttf-ubuntu=0.83=h77eed37_2 - fontconfig=2.14.2=h14ed4e7_0 - fonts-conda-ecosystem=1=0 - fonts-conda-forge=1=0 - - freetype=2.12.1=hca18f0e_1 - - freexl=1.0.6=h166bdaf_1 - - gdal=3.6.3=py39h7a29aee_7 - - geos=3.11.2=hcb278e6_0 - - geotiff=1.7.1=h480ec47_8 - - gettext=0.21.1=h27087fc_0 - - giflib=5.2.1=h0b41bf4_3 - - hdf4=4.2.15=h501b40f_6 - - hdf5=1.14.0=nompi_hb72d44e_103 - - icu=70.1=h27087fc_0 - - idna=3.4=pyhd8ed1ab_0 - - importlib-metadata=6.3.0=pyha770c72_0 - - importlib_metadata=6.3.0=hd8ed1ab_0 - - ipykernel=6.22.0=pyh210e3f2_0 - - ipython=8.12.0=pyh41d4057_0 - - jedi=0.18.2=pyhd8ed1ab_0 - - json-c=0.16=hc379101_0 - - jupyter_client=8.1.0=pyhd8ed1ab_0 - - jupyter_core=5.3.0=py39hf3d152e_0 - - kealib=1.5.0=he7a6254_1 + - fonttools=4.53.0=py312h9a8786e_0 + - freetype=2.12.1=h267a509_2 + - freexl=2.0.0=h743c826_0 + - gdal=3.9.0=py312h86af8fa_7 + - geos=3.12.1=h59595ed_0 + - geotiff=1.7.3=hf7fa9e8_1 + - gettext=0.22.5=h59595ed_2 + - gettext-tools=0.22.5=h59595ed_2 + - giflib=5.2.2=hd590300_0 + - glib=2.80.2=hf974151_0 + - glib-tools=2.80.2=hb6ce0ca_0 + - graphite2=1.3.13=h59595ed_1003 + - gst-plugins-base=1.24.4=h9ad1361_0 + - gstreamer=1.24.4=haf2f30d_0 + - harfbuzz=8.5.0=hfac3d4d_0 + - hdf4=4.2.15=h2a13503_7 + - hdf5=1.14.3=nompi_hdf9ad27_105 + - icu=73.2=h59595ed_0 + - importlib-metadata=7.1.0=pyha770c72_0 + - importlib_metadata=7.1.0=hd8ed1ab_0 + - ipykernel=6.29.4=pyh3099207_0 + - ipython=8.25.0=pyh707e725_0 + - jedi=0.19.1=pyhd8ed1ab_0 + - json-c=0.17=h7ab15ed_0 + - jupyter_client=8.6.2=pyhd8ed1ab_0 + - jupyter_core=5.7.2=py312h7900ff3_0 + - kealib=1.5.3=hee9dde6_1 - keyutils=1.6.1=h166bdaf_0 - - krb5=1.20.1=h81ceb04_0 - - lcms2=2.15=haa2dc70_1 - - ld_impl_linux-64=2.38=h1181459_1 + - kiwisolver=1.4.5=py312h8572e83_1 + - krb5=1.21.2=h659d440_0 + - lame=3.100=h166bdaf_1003 + - lcms2=2.16=hb7c19ff_0 + - ld_impl_linux-64=2.40=hf3520f5_7 - lerc=4.0.0=h27087fc_0 - - libaec=1.0.6=hcb278e6_1 - - libblas=3.9.0=16_linux64_openblas - - libcblas=3.9.0=16_linux64_openblas - - libcurl=7.88.1=hdc1c0ab_1 - - libdeflate=1.18=h0b41bf4_0 + - libabseil=20240116.2=cxx17_h59595ed_0 + - libaec=1.1.3=h59595ed_0 + - libarchive=3.7.4=hfca40fe_0 + - libasprintf=0.22.5=h661eb56_2 + - libasprintf-devel=0.22.5=h661eb56_2 + - libblas=3.9.0=22_linux64_openblas + - libboost-headers=1.85.0=ha770c72_1 + - libbrotlicommon=1.1.0=hd590300_1 + - libbrotlidec=1.1.0=hd590300_1 + - libbrotlienc=1.1.0=hd590300_1 + - libcap=2.69=h0f662aa_0 + - libcblas=3.9.0=22_linux64_openblas + - libclang-cpp15=15.0.7=default_h127d8a8_5 + - libclang13=18.1.7=default_h087397f_0 + - libcrc32c=1.1.2=h9c3ff4c_0 + - libcups=2.3.3=h4637d8d_4 + - libcurl=8.8.0=hca28451_0 + - libdeflate=1.20=hd590300_0 - libedit=3.1.20191231=he28a2e2_2 - - libev=4.33=h516909a_1 - - libexpat=2.5.0=hcb278e6_1 - - libffi=3.4.2=h6a678d5_6 - - libgcc-ng=12.2.0=h65d4601_19 - - libgdal=3.6.3=h9c5bede_7 - - libgfortran-ng=12.2.0=h69a702a_19 - - libgfortran5=12.2.0=h337968e_19 - - libglib=2.74.1=h606061b_1 - - libgomp=12.2.0=h65d4601_19 - - libiconv=1.17=h166bdaf_0 - - libjpeg-turbo=2.1.5.1=h0b41bf4_0 - - libkml=1.3.0=h37653c0_1015 - - liblapack=3.9.0=16_linux64_openblas - - libnetcdf=4.9.2=nompi_hf3f8848_103 - - libnghttp2=1.52.0=h61bc06f_0 - - libnsl=2.0.0=h7f98852_0 - - libopenblas=0.3.21=pthreads_h78a6416_3 - - libpng=1.6.39=h753d276_0 - - libpq=15.2=hb675445_0 - - librttopo=1.1.0=h0d5128d_13 + - libev=4.33=hd590300_2 + - libevent=2.1.12=hf998b51_1 + - libexpat=2.6.2=h59595ed_0 + - libffi=3.4.2=h7f98852_5 + - libflac=1.4.3=h59595ed_0 + - libgcc-ng=13.2.0=h77fa898_10 + - libgcrypt=1.10.3=hd590300_0 + - libgdal=3.9.0=h471f4ab_7 + - libgettextpo=0.22.5=h59595ed_2 + - libgettextpo-devel=0.22.5=h59595ed_2 + - libgfortran-ng=13.2.0=h69a702a_10 + - libgfortran5=13.2.0=h3d2ce59_10 + - libglib=2.80.2=hf974151_0 + - libgomp=13.2.0=h77fa898_10 + - libgoogle-cloud=2.25.0=h2736e30_0 + - libgoogle-cloud-storage=2.25.0=h3d9a0c8_0 + - libgpg-error=1.49=h4f305b6_0 + - libgrpc=1.62.2=h15f2491_0 + - libiconv=1.17=hd590300_2 + - libjpeg-turbo=3.0.0=hd590300_1 + - libkml=1.3.0=h01aab08_1018 + - liblapack=3.9.0=22_linux64_openblas + - libllvm15=15.0.7=hb3ce162_4 + - libllvm18=18.1.7=hc9dba70_1 + - libnetcdf=4.9.2=nompi_h135f659_114 + - libnghttp2=1.58.0=h47da74e_1 + - libnsl=2.0.1=hd590300_0 + - libogg=1.3.4=h7f98852_1 + - libopenblas=0.3.27=pthreads_h413a1c8_0 + - libopus=1.3.1=h7f98852_1 + - libpng=1.6.43=h2797004_0 + - libpq=16.3=ha72fbe1_0 + - libprotobuf=4.25.3=h08a7969_0 + - libre2-11=2023.09.01=h5a48ba9_2 + - librttopo=1.1.0=h8917695_15 + - libsndfile=1.2.2=hc60ed4a_1 - libsodium=1.0.18=h36c2ea0_1 - - libspatialite=5.0.1=h7d1ca68_25 - - libsqlite=3.40.0=h753d276_0 - - libssh2=1.10.0=hf14f497_3 - - libstdcxx-ng=12.2.0=h46fd767_19 - - libtiff=4.5.0=ha587672_6 + - libspatialite=5.1.0=h6fbd9c4_7 + - libsqlite=3.46.0=hde9e2c9_0 + - libssh2=1.11.0=h0841786_0 + - libstdcxx-ng=13.2.0=hc0a3c3a_10 + - libsystemd0=255=h3516f8a_1 + - libtiff=4.6.0=h1dd3fc0_3 - libuuid=2.38.1=h0b41bf4_0 - - libwebp-base=1.3.0=h0b41bf4_0 - - libxcb=1.13=h7f98852_1004 - - libxml2=2.10.3=hca2bb57_4 - - libzip=1.9.2=hc929e4a_1 - - libzlib=1.2.13=h166bdaf_4 + - libvorbis=1.3.7=h9c3ff4c_0 + - libwebp-base=1.4.0=hd590300_0 + - libxcb=1.15=h0b41bf4_0 + - libxcrypt=4.4.36=hd590300_1 + - libxkbcommon=1.7.0=h662e7e4_0 + - libxml2=2.12.7=hc051c1a_1 + - libzip=1.10.1=h2629f0a_3 + - libzlib=1.3.1=h4ab18f5_1 - lz4-c=1.9.4=hcb278e6_0 - - matplotlib-inline=0.1.6=pyhd8ed1ab_0 - - ncurses=6.4=h6a678d5_0 - - nest-asyncio=1.5.6=pyhd8ed1ab_0 - - netcdf4=1.6.3=nompi_py39h369ccc5_102 + - lzo=2.10=hd590300_1001 + - matplotlib=3.8.4=py312h7900ff3_2 + - matplotlib-base=3.8.4=py312h20ab3a6_2 + - matplotlib-inline=0.1.7=pyhd8ed1ab_0 + - minizip=4.0.7=h401b404_0 + - mpg123=1.32.6=h59595ed_0 + - munkres=1.1.4=pyh9f0ad1d_0 + - mysql-common=8.3.0=hf1915f5_4 + - mysql-libs=8.3.0=hca2cd23_4 + - ncurses=6.5=h59595ed_0 + - nest-asyncio=1.6.0=pyhd8ed1ab_0 - nspr=4.35=h27087fc_0 - - nss=3.89=he45b914_0 - - numpy=1.24.2=py39h7360e5f_0 - - openjpeg=2.5.0=hfec8fc6_2 - - openssl=3.1.0=h0b41bf4_0 - - packaging=23.0=pyhd8ed1ab_0 - - pandas=2.0.0=py39h2ad29b5_0 - - parso=0.8.3=pyhd8ed1ab_0 - - pcre2=10.40=hc3806b6_0 - - pexpect=4.8.0=pyh1a96a4e_2 + - nss=3.101=h593d115_0 + - numpy=2.0.0=py312h22e1c76_0 + - openjpeg=2.5.2=h488ebb8_0 + - openssl=3.3.1=h4ab18f5_0 + - packaging=24.1=pyhd8ed1ab_0 + - parso=0.8.4=pyhd8ed1ab_0 + - pcre2=10.43=hcad00b1_0 + - pexpect=4.9.0=pyhd8ed1ab_0 - pickleshare=0.7.5=py_1003 - - pip=23.0.1=py39h06a4308_0 - - pixman=0.40.0=h36c2ea0_0 - - platformdirs=3.2.0=pyhd8ed1ab_0 - - pooch=1.7.0=pyha770c72_3 - - poppler=23.04.0=hf052cbe_1 + - pillow=10.3.0=py312hdcec9eb_0 + - pip=24.0=pyhd8ed1ab_0 + - pixman=0.43.2=h59595ed_0 + - platformdirs=4.2.2=pyhd8ed1ab_0 + - ply=3.11=pyhd8ed1ab_2 + - poppler=24.04.0=hb6cd0d7_0 - poppler-data=0.4.12=hd8ed1ab_0 - - postgresql=15.2=h3248436_0 - - proj=9.2.0=h8ffa02c_0 - - prompt-toolkit=3.0.38=pyha770c72_0 - - prompt_toolkit=3.0.38=hd8ed1ab_0 - - psutil=5.9.4=py39hb9d737c_0 + - postgresql=16.3=h8e811e2_0 + - proj=9.4.1=hb784bbd_0 + - prompt-toolkit=3.0.47=pyha770c72_0 + - psutil=5.9.8=py312h98912ed_0 - pthread-stubs=0.4=h36c2ea0_1001 - ptyprocess=0.7.0=pyhd3deb0d_0 + - pulseaudio-client=17.0=hb77b528_0 - pure_eval=0.2.2=pyhd8ed1ab_0 - - pycparser=2.21=pyhd8ed1ab_0 - - pygments=2.15.0=pyhd8ed1ab_0 - - pykdtree=1.3.7.post0=py39h389d5f1_0 - - pyopenssl=23.1.1=pyhd8ed1ab_0 - - pyproj=3.5.0=py39h718ffca_1 - - pysocks=1.7.1=pyha2e5f31_6 - - python=3.9.16=h2782a2a_0_cpython - - python-dateutil=2.8.2=pyhd8ed1ab_0 - - python-tzdata=2023.3=pyhd8ed1ab_0 - - python_abi=3.9=3_cp39 - - pytz=2023.3=pyhd8ed1ab_0 - - pyzmq=25.0.2=py39h0be026e_0 - - readline=8.2=h5eee18b_0 - - requests=2.28.2=pyhd8ed1ab_1 - - scipy=1.10.1=py39h7360e5f_0 - - setuptools=65.6.3=py39h06a4308_0 + - pygments=2.18.0=pyhd8ed1ab_0 + - pyparsing=3.1.2=pyhd8ed1ab_0 + - pyproj=3.6.1=py312h5d05ceb_7 + - pyqt=5.15.9=py312h949fe66_5 + - pyqt5-sip=12.12.2=py312h30efb56_5 + - pyshp=2.3.1=pyhd8ed1ab_0 + - python=3.12.4=h194c7f8_0_cpython + - python-dateutil=2.9.0=pyhd8ed1ab_0 + - python_abi=3.12=4_cp312 + - pyzmq=26.0.3=py312h8fd38d8_0 + - qt-main=5.15.8=hc9dc06e_21 + - re2=2023.09.01=h7f4b329_2 + - readline=8.2=h8228510_1 + - s2n=1.4.16=he19d79f_0 + - setuptools=70.0.0=pyhd8ed1ab_0 + - shapely=2.0.4=py312ha5b4d35_1 + - sip=6.7.12=py312h30efb56_0 - six=1.16.0=pyh6c4a22f_0 - - snappy=1.1.10=h9fff704_0 - - sqlite=3.41.1=h5eee18b_0 + - snappy=1.2.0=hdb0a2a9_1 + - spdlog=1.13.0=hd2e6256_0 + - sqlite=3.46.0=h6d4b2fc_0 - stack_data=0.6.2=pyhd8ed1ab_0 - - tiledb=2.13.2=hd532e3d_0 - - tk=8.6.12=h1ccaba5_0 - - tornado=6.2=py39hb9d737c_1 - - traitlets=5.9.0=pyhd8ed1ab_0 - - typing-extensions=4.5.0=hd8ed1ab_0 - - typing_extensions=4.5.0=pyha770c72_0 - - tzcode=2023c=h0b41bf4_0 - - tzdata=2023c=h04d1e81_0 - - urllib3=1.26.15=pyhd8ed1ab_0 - - wcwidth=0.2.6=pyhd8ed1ab_0 - - wheel=0.38.4=py39h06a4308_0 - - xerces-c=3.2.4=h55805fa_1 + - tiledb=2.24.0=h73c5a7c_3 + - tk=8.6.13=noxft_h4845f30_101 + - toml=0.10.2=pyhd8ed1ab_0 + - tomli=2.0.1=pyhd8ed1ab_0 + - tornado=6.4.1=py312h9a8786e_0 + - traitlets=5.14.3=pyhd8ed1ab_0 + - typing_extensions=4.12.2=pyha770c72_0 + - tzcode=2024a=h3f72095_0 + - uriparser=0.9.8=hac33072_0 + - wcwidth=0.2.13=pyhd8ed1ab_0 + - wheel=0.43.0=pyhd8ed1ab_1 + - xcb-util=0.4.0=hd590300_1 + - xcb-util-image=0.4.0=h8ee46fc_1 + - xcb-util-keysyms=0.4.0=h8ee46fc_1 + - xcb-util-renderutil=0.3.9=hd590300_1 + - xcb-util-wm=0.4.1=h8ee46fc_1 + - xerces-c=3.2.5=hac6953d_0 + - xkeyboard-config=2.42=h4ab18f5_0 - xorg-kbproto=1.0.7=h7f98852_1002 - - xorg-libice=1.0.10=h7f98852_0 - - xorg-libsm=1.2.3=hd9c2040_1000 - - xorg-libx11=1.8.4=h0b41bf4_0 - - xorg-libxau=1.0.9=h7f98852_0 + - xorg-libice=1.1.1=hd590300_0 + - xorg-libsm=1.2.4=h7391055_0 + - xorg-libx11=1.8.9=h8ee46fc_0 + - xorg-libxau=1.0.11=hd590300_0 - xorg-libxdmcp=1.1.3=h7f98852_0 - xorg-libxext=1.3.4=h0b41bf4_2 - - xorg-libxrender=0.9.10=h7f98852_1003 + - xorg-libxrender=0.9.11=hd590300_0 - xorg-renderproto=0.11.1=h7f98852_1002 - xorg-xextproto=7.3.0=h0b41bf4_1003 + - xorg-xf86vidmodeproto=2.3.1=h7f98852_1002 - xorg-xproto=7.0.31=h7f98852_1007 - - xz=5.2.10=h5eee18b_1 - - zeromq=4.3.4=h9c3ff4c_1 - - zipp=3.15.0=pyhd8ed1ab_0 - - zlib=1.2.13=h166bdaf_4 - - zstd=1.5.2=h3eb15da_6 + - xz=5.2.6=h166bdaf_0 + - zeromq=4.3.5=h75354e8_4 + - zipp=3.19.2=pyhd8ed1ab_0 + - zlib=1.3.1=h4ab18f5_1 + - zstd=1.5.6=ha6fb4c9_0 - pip: - - alabaster==0.7.13 - - attrs==22.2.0 - - babel==2.12.1 - - beautifulsoup4==4.12.2 - - bleach==6.0.0 - - coverage==7.2.3 + - alabaster==0.7.16 + - attrs==23.2.0 + - babel==2.15.0 + - beautifulsoup4==4.12.3 + - bleach==6.1.0 + - cftime==1.6.4 + - charset-normalizer==3.3.2 + - coverage==7.5.3 - defusedxml==0.7.1 - - docutils==0.18.1 - - exceptiongroup==1.1.1 - - fastjsonschema==2.16.3 + - docutils==0.20.1 + - fastjsonschema==2.20.0 + - idna==3.7 - imagesize==1.4.1 - iniconfig==2.0.0 - - jinja2==3.1.2 - - jsonschema==4.17.3 - - jupyterlab-pygments==0.2.2 - - markupsafe==2.1.2 - - mistune==2.0.5 - - nbclient==0.7.3 - - nbconvert==7.3.1 - - nbformat==5.8.0 - - nbsphinx==0.9.1 - - pandocfilters==1.5.0 - - pluggy==1.0.0 - - pyrsistent==0.19.3 - - pytest==7.3.0 - - pytest-cov==4.0.0 + - jinja2==3.1.4 + - jsonschema==4.22.0 + - jsonschema-specifications==2023.12.1 + - jupyterlab-pygments==0.3.0 + - markupsafe==2.1.5 + - mistune==3.0.2 + - nbclient==0.10.0 + - nbconvert==7.16.4 + - nbformat==5.10.4 + - nbsphinx==0.9.4 + - netcdf4==1.7.0 + - pandas==2.2.2 + - pandocfilters==1.5.1 + - pluggy==1.5.0 + - pykdtree==1.3.12 + - pytest==8.2.2 + - pytest-cov==5.0.0 + - pytz==2024.1 + - referencing==0.35.1 + - requests==2.32.3 + - rpds-py==0.18.1 + - scipy==1.13.1 - snowballstemmer==2.2.0 - - soupsieve==2.4 - - sphinx==6.1.3 - - sphinx-rtd-theme==1.2.0 - - sphinxcontrib-applehelp==1.0.4 - - sphinxcontrib-devhelp==1.0.2 - - sphinxcontrib-htmlhelp==2.0.1 + - soupsieve==2.5 + - sphinx==7.3.7 + - sphinx-rtd-theme==2.0.0 + - sphinxcontrib-applehelp==1.0.8 + - sphinxcontrib-devhelp==1.0.6 + - sphinxcontrib-htmlhelp==2.0.5 - sphinxcontrib-jquery==4.1 - sphinxcontrib-jsmath==1.0.1 - - sphinxcontrib-qthelp==1.0.3 - - sphinxcontrib-serializinghtml==1.1.5 - - tinycss2==1.2.1 - - tomli==2.0.1 + - sphinxcontrib-qthelp==1.0.7 + - sphinxcontrib-serializinghtml==1.1.10 + - tinycss2==1.3.0 + - tzdata==2024.1 + - urllib3==2.2.2 - webencodings==0.5.1 diff --git a/src/pygeogrids/grids.py b/src/pygeogrids/grids.py index cd5446c..14559f2 100644 --- a/src/pygeogrids/grids.py +++ b/src/pygeogrids/grids.py @@ -393,7 +393,7 @@ def _split_grid_points(self, n): for i, (lon, lat) in enumerate(zip(self.subarrlons[n], self.subarrlats[n])): yield self.subgpis[n][i], lon, lat - def find_nearest_gpi(self, lon, lat, max_dist=np.Inf): + def find_nearest_gpi(self, lon, lat, max_dist=np.inf): """ Finds nearest gpi, builds kdTree if it does not yet exist. @@ -404,7 +404,7 @@ def find_nearest_gpi(self, lon, lat, max_dist=np.Inf): lat : float or iterable Latitude of point. max_dist : float, optional - Maximum distance [m] to consider for search (default: np.Inf). + Maximum distance [m] to consider for search (default: np.inf). Returns ------- @@ -425,7 +425,7 @@ def find_nearest_gpi(self, lon, lat, max_dist=np.Inf): return gpi, distance - def find_k_nearest_gpi(self, lon, lat, max_dist=np.Inf, k=1): + def find_k_nearest_gpi(self, lon, lat, max_dist=np.inf, k=1): """ Find k nearest gpi, builds kdTree if it does not yet exist. @@ -436,7 +436,7 @@ def find_k_nearest_gpi(self, lon, lat, max_dist=np.Inf, k=1): lat : float or iterable Latitude of point. max_dist : float, optional - Maximum distance to consider for search (default: np.Inf). + Maximum distance to consider for search (default: np.inf). k : int, optional The number of nearest neighbors to return (default: 1). @@ -542,7 +542,7 @@ def gpi2rowcol(self, gpi): else: raise (GridDefinitionError("Grid has no 2D shape")) - def calc_lut(self, other, max_dist=np.Inf, into_subset=False): + def calc_lut(self, other, max_dist=np.inf, into_subset=False): """ Takes other BasicGrid or CellGrid objects and computes a lookup table between them. The lut will have the size of self.n_gpis and will diff --git a/src/pygeogrids/nearest_neighbor.py b/src/pygeogrids/nearest_neighbor.py index df4dd03..acf00d6 100644 --- a/src/pygeogrids/nearest_neighbor.py +++ b/src/pygeogrids/nearest_neighbor.py @@ -158,7 +158,7 @@ def _build_kdtree(self): Please install pykdtree and/or scipy." ) - def find_nearest_index(self, lon, lat, max_dist=np.Inf, k=1): + def find_nearest_index(self, lon, lat, max_dist=np.inf, k=1): """ finds nearest index, builds kdTree if it does not yet exist @@ -169,7 +169,7 @@ def find_nearest_index(self, lon, lat, max_dist=np.Inf, k=1): lat : float, list or numpy.array latitude of point max_dist : float, optional - Maximum distance to consider for search (default: np.Inf). + Maximum distance to consider for search (default: np.inf). k : int, optional The number of nearest neighbors to return (default: 1).