SciTools / cartopy

Cartopy - a cartographic python library with matplotlib support
https://scitools.org.uk/cartopy/docs/latest
BSD 3-Clause "New" or "Revised" License
1.41k stars 359 forks source link

ValueError: 'x' must be finite, check for nan or inf values #2217

Closed e5k closed 1 year ago

e5k commented 1 year ago

Description

Trying to plot array data (epsg 4326) on a cartopy map (Robinson). I managed to make it work on an older environment, but now that I updated everything I am getting this error:

ValueError: 'x' must be finite, check for nan or inf values

In my searches, I also noticed that it is happening here: https://tutorial.xarray.dev/intermediate/hvplot.html#geography

Code to reproduce

fig = plt.figure(figsize=(18,10))
ax = fig.add_subplot(1,1,1, projection=ccrs.Robinson())
im = ax.imshow(cropdf, transform=ccrs.PlateCarree())

cropdf looks like this:

<xarray.DataArray (y: 2160, x: 4320)>
array([[nan, nan, nan, ..., nan, nan, nan],
       [nan, nan, nan, ..., nan, nan, nan],
       [nan, nan, nan, ..., nan, nan, nan],
       ...,
       [nan, nan, nan, ..., nan, nan, nan],
       [nan, nan, nan, ..., nan, nan, nan],
       [nan, nan, nan, ..., nan, nan, nan]], dtype=float32)
Coordinates:
    tech         <U1 'A'
  * x            (x) float64 -180.0 -179.9 -179.8 -179.7 ... 179.8 179.9 180.0
  * y            (y) float64 89.96 89.88 89.79 89.71 ... -89.79 -89.87 -89.96
    spatial_ref  int64 0

Traceback

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[/Users/seb/Library/CloudStorage/OneDrive-unige.ch/Ag-Impact/Global](https://file+.vscode-resource.vscode-cdn.net/Users/seb/Library/CloudStorage/OneDrive-unige.ch/Ag-Impact/Global) map/Plot_tests/plot_global_exposure.py in line 35
     104 ax.set_title(None)
     106 # # Add tephra
     107 # tephra[tephra.VEI==4].dissolve().boundary.plot(ax=ax, color='red', lw=.4)
     108 # tephra[tephra.VEI==5].dissolve().boundary.plot(ax=ax, color='blue', lw=.4)
   (...)
     115 # Add colorbar
     116 # im = ax.imshow(cropdf, transform=crs, cmap=cmap, vmin=vmin, vmax=vmax)
---> 117 im = ax.imshow(CROPS.sel(tech='A')['rice'], transform=crs, cmap=cmap, vmin=vmin, vmax=vmax)
     118 # # https://stackoverflow.com/questions/68625921/how-to-adjust-matplotlib-colorbar-range-in-xarray-plot
     119 # cbar_ax = fig.add_axes([0.35, 0.25, 0.3, 0.02])  # Left, bottom, width, height.
     120 # cbar = fig.colorbar(im, cax=cbar_ax, extend='max', orientation='horizontal')
     121 # cbar.set_label('Production (tons)')

File [~/mambaforge/envs/gis/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py:318](https://file+.vscode-resource.vscode-cdn.net/Users/seb/Documents/Codes/VolcGIS/~/mambaforge/envs/gis/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py:318), in _add_transform..wrapper(self, *args, **kwargs)
    313     raise ValueError(f'Invalid transform: Spherical {func.__name__} '
    314                      'is not supported - consider using '
    315                      'PlateCarree/RotatedPole.')
    317 kwargs['transform'] = transform
--> 318 return func(self, *args, **kwargs)

File [~/mambaforge/envs/gis/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py:1331](https://file+.vscode-resource.vscode-cdn.net/Users/seb/Documents/Codes/VolcGIS/~/mambaforge/envs/gis/lib/python3.11/site-packages/cartopy/mpl/geoaxes.py:1331), in GeoAxes.imshow(self, img, *args, **kwargs)
   1329 from cartopy.img_transform import warp_array
   1330 original_extent = extent
-> 1331 img, extent = warp_array(img,
   1332                          source_proj=transform,
   1333                          source_extent=original_extent,
   1334                          target_proj=self.projection,
   1335                          target_res=regrid_shape,
   1336                          target_extent=target_extent,
   1337                          mask_extrapolated=True,
   1338                          )
   1339 alpha = kwargs.pop('alpha', None)
   1340 if np.array(alpha).ndim == 2:

File [~/mambaforge/envs/gis/lib/python3.11/site-packages/cartopy/img_transform.py:192](https://file+.vscode-resource.vscode-cdn.net/Users/seb/Documents/Codes/VolcGIS/~/mambaforge/envs/gis/lib/python3.11/site-packages/cartopy/img_transform.py:192), in warp_array(array, target_proj, source_proj, target_res, source_extent, target_extent, mask_extrapolated)
    186 # XXX Take into account the extents of the original to determine
    187 # target_extents?
    188 target_native_x, target_native_y, extent = mesh_projection(
    189     target_proj, target_res[0], target_res[1],
    190     x_extents=target_x_extents, y_extents=target_y_extents)
--> 192 array = regrid(array, source_native_xy[0], source_native_xy[1],
    193                source_proj, target_proj,
    194                target_native_x, target_native_y,
    195                mask_extrapolated)
    196 return array, extent

File [~/mambaforge/envs/gis/lib/python3.11/site-packages/cartopy/img_transform.py:278](https://file+.vscode-resource.vscode-cdn.net/Users/seb/Documents/Codes/VolcGIS/~/mambaforge/envs/gis/lib/python3.11/site-packages/cartopy/img_transform.py:278), in regrid(array, source_x_coords, source_y_coords, source_proj, target_proj, target_x_points, target_y_points, mask_extrapolated)
    274 else:
    275     # Versions of scipy >= v0.16 added the balanced_tree argument,
    276     # which caused the KDTree to hang with this input.
    277     kdtree = scipy.spatial.cKDTree(xyz, balanced_tree=False)
--> 278     _, indices = kdtree.query(target_xyz, k=1)
    279 mask = indices >= len(xyz)
    280 indices[mask] = 0

File _ckdtree.pyx:795, in scipy.spatial._ckdtree.cKDTree.query()

ValueError: 'x' must be finite, check for nan or inf values
Full environment definition ### Operating system MacOS 12.5.1 ### Cartopy version 0.21.1 ### mamba list ``` # packages in environment at /Users/seb/mambaforge/envs/gis: # # Name Version Build Channel affine 2.4.0 pyhd8ed1ab_0 conda-forge anyio 3.7.1 pyhd8ed1ab_0 conda-forge appnope 0.1.3 pyhd8ed1ab_0 conda-forge argon2-cffi 21.3.0 pyhd8ed1ab_0 conda-forge argon2-cffi-bindings 21.2.0 py311he2be06e_3 conda-forge asttokens 2.2.1 pyhd8ed1ab_0 conda-forge async-lru 2.0.3 pyhd8ed1ab_0 conda-forge attrs 23.1.0 pyh71513ae_1 conda-forge aws-c-auth 0.7.0 hf4e22b4_2 conda-forge aws-c-cal 0.6.0 h43a37b4_0 conda-forge aws-c-common 0.8.23 hb547adb_0 conda-forge aws-c-compression 0.2.17 h31a6291_1 conda-forge aws-c-event-stream 0.3.1 h1e1aaf7_1 conda-forge aws-c-http 0.7.11 h3107daf_0 conda-forge aws-c-io 0.13.28 hf096fb3_0 conda-forge aws-c-mqtt 0.8.14 h9418dbe_2 conda-forge aws-c-s3 0.3.13 h79b0d72_2 conda-forge aws-c-sdkutils 0.1.11 h31a6291_1 conda-forge aws-checksums 0.1.16 h31a6291_1 conda-forge aws-crt-cpp 0.20.3 h0918d87_4 conda-forge aws-sdk-cpp 1.10.57 h6f3a27c_17 conda-forge babel 2.12.1 pyhd8ed1ab_1 conda-forge backcall 0.2.0 pyh9f0ad1d_0 conda-forge backports 1.0 pyhd8ed1ab_3 conda-forge backports.functools_lru_cache 1.6.5 pyhd8ed1ab_0 conda-forge beautifulsoup4 4.12.2 pyha770c72_0 conda-forge bleach 6.0.0 pyhd8ed1ab_0 conda-forge blosc 1.21.4 hc338f07_0 conda-forge boost-cpp 1.78.0 h9ed8d21_3 conda-forge branca 0.6.0 pyhd8ed1ab_0 conda-forge brotli 1.0.9 h1a8c8d9_9 conda-forge brotli-bin 1.0.9 h1a8c8d9_9 conda-forge brotli-python 1.0.9 py311ha397e9f_9 conda-forge bzip2 1.0.8 h3422bc3_4 conda-forge c-ares 1.19.1 hb547adb_0 conda-forge ca-certificates 2023.5.7 hf0a4a13_0 conda-forge cairo 1.16.0 h1e71087_1016 conda-forge cartopy 0.21.1 py311hbf64cf6_1 conda-forge certifi 2023.5.7 pyhd8ed1ab_0 conda-forge cffi 1.15.1 py311hae827db_3 conda-forge cfitsio 4.2.0 h2f961c4_0 conda-forge charset-normalizer 3.2.0 pyhd8ed1ab_0 conda-forge click 8.1.6 unix_pyh707e725_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.7.2 pyhd8ed1ab_1 conda-forge comm 0.1.3 pyhd8ed1ab_0 conda-forge contourpy 1.1.0 py311he4fd1f5_0 conda-forge curl 8.2.0 hc52a3a8_0 conda-forge cycler 0.11.0 pyhd8ed1ab_0 conda-forge debugpy 1.6.7 py311ha397e9f_0 conda-forge decorator 5.1.1 pyhd8ed1ab_0 conda-forge defusedxml 0.7.1 pyhd8ed1ab_0 conda-forge entrypoints 0.4 pyhd8ed1ab_0 conda-forge et_xmlfile 1.1.0 pyhd8ed1ab_0 conda-forge exceptiongroup 1.1.2 pyhd8ed1ab_0 conda-forge executing 1.2.0 pyhd8ed1ab_0 conda-forge expat 2.5.0 hb7217d7_1 conda-forge fiona 1.9.4 py311h0e2296b_0 conda-forge flit-core 3.9.0 pyhd8ed1ab_0 conda-forge folium 0.14.0 pyhd8ed1ab_0 conda-forge font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge font-ttf-inconsolata 3.000 h77eed37_0 conda-forge font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge font-ttf-ubuntu 0.83 hab24e00_0 conda-forge fontconfig 2.14.2 h82840c6_0 conda-forge fonts-conda-ecosystem 1 0 conda-forge fonts-conda-forge 1 0 conda-forge fonttools 4.41.0 py311heffc1b2_0 conda-forge freetype 2.12.1 hd633e50_1 conda-forge freexl 1.0.6 h1a8c8d9_1 conda-forge gdal 3.7.0 py311h509623a_3 conda-forge geopandas 0.13.2 pyhd8ed1ab_1 conda-forge geopandas-base 0.13.2 pyha770c72_1 conda-forge geos 3.11.2 hb7217d7_0 conda-forge geotiff 1.7.1 h00e2a8a_10 conda-forge gettext 0.21.1 h0186832_0 conda-forge giflib 5.2.1 h1a8c8d9_3 conda-forge hdf4 4.2.15 h8111dcc_6 conda-forge hdf5 1.14.1 nompi_h3aba7b3_100 conda-forge icu 72.1 he12128b_0 conda-forge idna 3.4 pyhd8ed1ab_0 conda-forge importlib-metadata 6.8.0 pyha770c72_0 conda-forge importlib_metadata 6.8.0 hd8ed1ab_0 conda-forge importlib_resources 6.0.0 pyhd8ed1ab_1 conda-forge ipykernel 6.24.0 pyh5fb750a_0 conda-forge ipython 8.14.0 pyhd1c38e8_0 conda-forge jedi 0.18.2 pyhd8ed1ab_0 conda-forge jinja2 3.1.2 pyhd8ed1ab_1 conda-forge joblib 1.3.0 pyhd8ed1ab_1 conda-forge json-c 0.16 hc449e50_0 conda-forge json5 0.9.14 pyhd8ed1ab_0 conda-forge jsonschema 4.18.4 pyhd8ed1ab_0 conda-forge jsonschema-specifications 2023.7.1 pyhd8ed1ab_0 conda-forge jupyter-lsp 2.2.0 pyhd8ed1ab_0 conda-forge jupyter_client 8.3.0 pyhd8ed1ab_0 conda-forge jupyter_core 5.3.1 py311h267d04e_0 conda-forge jupyter_events 0.6.3 pyhd8ed1ab_0 conda-forge jupyter_server 2.7.0 pyhd8ed1ab_0 conda-forge jupyter_server_terminals 0.4.4 pyhd8ed1ab_1 conda-forge jupyterlab 4.0.3 pyhd8ed1ab_0 conda-forge jupyterlab_pygments 0.2.2 pyhd8ed1ab_0 conda-forge jupyterlab_server 2.23.0 pyhd8ed1ab_0 conda-forge kealib 1.5.1 h34092a9_4 conda-forge kiwisolver 1.4.4 py311hd6ee22a_1 conda-forge krb5 1.21.1 h92f50d5_0 conda-forge lcms2 2.15 hd835a16_1 conda-forge lerc 4.0.0 h9a09cb3_0 conda-forge libaec 1.0.6 hb7217d7_1 conda-forge libarchive 3.6.2 h82b9b87_1 conda-forge libblas 3.9.0 17_osxarm64_openblas conda-forge libbrotlicommon 1.0.9 h1a8c8d9_9 conda-forge libbrotlidec 1.0.9 h1a8c8d9_9 conda-forge libbrotlienc 1.0.9 h1a8c8d9_9 conda-forge libcblas 3.9.0 17_osxarm64_openblas conda-forge libcurl 8.2.0 hc52a3a8_0 conda-forge libcxx 16.0.6 h4653b0c_0 conda-forge libdeflate 1.18 h1a8c8d9_0 conda-forge libedit 3.1.20191231 hc8eb9b7_2 conda-forge libev 4.33 h642e427_1 conda-forge libexpat 2.5.0 hb7217d7_1 conda-forge libffi 3.4.2 h3422bc3_5 conda-forge libgdal 3.7.0 ha0783c4_3 conda-forge libgfortran 5.0.0 12_2_0_hd922786_31 conda-forge libgfortran5 12.2.0 h0eea778_31 conda-forge libglib 2.76.4 h24e9cb9_0 conda-forge libiconv 1.17 he4db4b2_0 conda-forge libjpeg-turbo 2.1.5.1 h1a8c8d9_0 conda-forge libkml 1.3.0 h41464e4_1015 conda-forge liblapack 3.9.0 17_osxarm64_openblas conda-forge libnetcdf 4.9.2 nompi_h9fa6108_109 conda-forge libnghttp2 1.52.0 hae82a92_0 conda-forge libopenblas 0.3.23 openmp_hc731615_0 conda-forge libpng 1.6.39 h76d750c_0 conda-forge libpq 15.3 hcea71ed_2 conda-forge librttopo 1.1.0 h6ecf6d2_13 conda-forge libsodium 1.0.18 h27ca646_1 conda-forge libspatialindex 1.9.3 hbdafb3b_4 conda-forge libspatialite 5.0.1 h31468cf_27 conda-forge libsqlite 3.42.0 hb31c410_0 conda-forge libssh2 1.11.0 h7a5bd25_0 conda-forge libtiff 4.5.1 h23a1a89_0 conda-forge libwebp-base 1.3.1 hb547adb_0 conda-forge libxcb 1.15 hf346824_0 conda-forge libxml2 2.11.4 he3bdae6_0 conda-forge libzip 1.9.2 h76ab92c_1 conda-forge libzlib 1.2.13 h53f4e23_5 conda-forge llvm-openmp 16.0.6 h1c12783_0 conda-forge lz4-c 1.9.4 hb7217d7_0 conda-forge lzo 2.10 h642e427_1000 conda-forge mapclassify 2.5.0 pyhd8ed1ab_1 conda-forge markupsafe 2.1.3 py311heffc1b2_0 conda-forge matplotlib-base 3.7.2 py311h3bc9839_0 conda-forge matplotlib-inline 0.1.6 pyhd8ed1ab_0 conda-forge mistune 3.0.0 pyhd8ed1ab_0 conda-forge munch 4.0.0 pyhd8ed1ab_0 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge nbclient 0.8.0 pyhd8ed1ab_0 conda-forge nbconvert-core 7.7.1 pyhd8ed1ab_1 conda-forge nbformat 5.9.1 pyhd8ed1ab_0 conda-forge ncurses 6.4 h7ea286d_0 conda-forge nest-asyncio 1.5.6 pyhd8ed1ab_0 conda-forge networkx 3.1 pyhd8ed1ab_0 conda-forge notebook-shim 0.2.3 pyhd8ed1ab_0 conda-forge nspr 4.35 hb7217d7_0 conda-forge nss 3.89 h789eff7_0 conda-forge numpy 1.25.1 py311hb8f3215_0 conda-forge openjpeg 2.5.0 hbc2ba62_2 conda-forge openpyxl 3.1.2 py311heffc1b2_0 conda-forge openssl 3.1.1 h53f4e23_1 conda-forge overrides 7.3.1 pyhd8ed1ab_0 conda-forge packaging 23.1 pyhd8ed1ab_0 conda-forge pandas 2.0.3 py311h9e438b8_1 conda-forge pandocfilters 1.5.0 pyhd8ed1ab_0 conda-forge parso 0.8.3 pyhd8ed1ab_0 conda-forge patsy 0.5.3 pyhd8ed1ab_0 conda-forge pcre2 10.40 hb34f9b4_0 conda-forge pexpect 4.8.0 pyh1a96a4e_2 conda-forge pickleshare 0.7.5 py_1003 conda-forge pillow 10.0.0 py311h095fde6_0 conda-forge pip 23.2 pyhd8ed1ab_0 conda-forge pixman 0.40.0 h27ca646_0 conda-forge pkgutil-resolve-name 1.3.10 pyhd8ed1ab_0 conda-forge platformdirs 3.9.1 pyhd8ed1ab_0 conda-forge pooch 1.7.0 pyha770c72_3 conda-forge poppler 23.05.0 h16d8c84_1 conda-forge poppler-data 0.4.12 hd8ed1ab_0 conda-forge postgresql 15.3 h00cd704_2 conda-forge proj 9.2.1 h8fdea58_0 conda-forge prometheus_client 0.17.1 pyhd8ed1ab_0 conda-forge prompt-toolkit 3.0.39 pyha770c72_0 conda-forge prompt_toolkit 3.0.39 hd8ed1ab_0 conda-forge psutil 5.9.5 py311he2be06e_0 conda-forge pthread-stubs 0.4 h27ca646_1001 conda-forge ptyprocess 0.7.0 pyhd3deb0d_0 conda-forge pure_eval 0.2.2 pyhd8ed1ab_0 conda-forge pycparser 2.21 pyhd8ed1ab_0 conda-forge pygments 2.15.1 pyhd8ed1ab_0 conda-forge pyobjc-core 9.2 py311hb702dc4_0 conda-forge pyobjc-framework-cocoa 9.2 py311hb702dc4_0 conda-forge pyparsing 3.0.9 pyhd8ed1ab_0 conda-forge pyproj 3.6.0 py311h280d66e_1 conda-forge pyshp 2.3.1 pyhd8ed1ab_0 conda-forge pysocks 1.7.1 pyha2e5f31_6 conda-forge python 3.11.4 h47c9636_0_cpython conda-forge python-dateutil 2.8.2 pyhd8ed1ab_0 conda-forge python-fastjsonschema 2.17.1 pyhd8ed1ab_0 conda-forge python-json-logger 2.0.7 pyhd8ed1ab_0 conda-forge python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python_abi 3.11 3_cp311 conda-forge pytz 2023.3 pyhd8ed1ab_0 conda-forge pyyaml 6.0 py311he2be06e_5 conda-forge pyzmq 25.1.0 py311hb1af645_0 conda-forge rasterio 1.3.8 py311h6456264_0 conda-forge readline 8.2 h92ec313_1 conda-forge referencing 0.30.0 pyhd8ed1ab_0 conda-forge regionmask 0.10.0 pyhd8ed1ab_0 conda-forge requests 2.31.0 pyhd8ed1ab_0 conda-forge rfc3339-validator 0.1.4 pyhd8ed1ab_0 conda-forge rfc3986-validator 0.1.1 pyh9f0ad1d_0 conda-forge rioxarray 0.14.1 pyhd8ed1ab_0 conda-forge rpds-py 0.9.2 py311h0563b04_0 conda-forge rtree 1.0.1 py311hd698ff7_1 conda-forge scikit-learn 1.3.0 py311hf0b18b8_0 conda-forge scipy 1.11.1 py311h93d07a4_0 conda-forge seaborn 0.12.2 hd8ed1ab_0 conda-forge seaborn-base 0.12.2 pyhd8ed1ab_0 conda-forge send2trash 1.8.2 pyhd1c38e8_0 conda-forge setuptools 68.0.0 pyhd8ed1ab_0 conda-forge shapely 2.0.1 py311h7f8cfc4_1 conda-forge six 1.16.0 pyh6c4a22f_0 conda-forge snappy 1.1.10 h17c5cce_0 conda-forge sniffio 1.3.0 pyhd8ed1ab_0 conda-forge snuggs 1.4.7 py_0 conda-forge soupsieve 2.3.2.post1 pyhd8ed1ab_0 conda-forge sqlite 3.42.0 h203b68d_0 conda-forge stack_data 0.6.2 pyhd8ed1ab_0 conda-forge statsmodels 0.14.0 py311hb49d859_1 conda-forge terminado 0.17.1 pyhd1c38e8_0 conda-forge threadpoolctl 3.2.0 pyha21a80b_0 conda-forge tiledb 2.13.2 h9bd36d0_0 conda-forge tinycss2 1.2.1 pyhd8ed1ab_0 conda-forge tk 8.6.12 he1e0b03_0 conda-forge tomli 2.0.1 pyhd8ed1ab_0 conda-forge tornado 6.3.2 py311heffc1b2_0 conda-forge traitlets 5.9.0 pyhd8ed1ab_0 conda-forge typing-extensions 4.7.1 hd8ed1ab_0 conda-forge typing_extensions 4.7.1 pyha770c72_0 conda-forge typing_utils 0.1.0 pyhd8ed1ab_0 conda-forge tzcode 2023c h1a8c8d9_0 conda-forge tzdata 2023c h71feb2d_0 conda-forge urllib3 2.0.3 pyhd8ed1ab_1 conda-forge wcwidth 0.2.6 pyhd8ed1ab_0 conda-forge webencodings 0.5.1 py_1 conda-forge websocket-client 1.6.1 pyhd8ed1ab_0 conda-forge wheel 0.40.0 pyhd8ed1ab_1 conda-forge xarray 2023.7.0 pyhd8ed1ab_0 conda-forge xerces-c 3.2.4 h68f8447_2 conda-forge xorg-libxau 1.0.11 hb547adb_0 conda-forge xorg-libxdmcp 1.1.3 h27ca646_0 conda-forge xyzservices 2023.7.0 pyhd8ed1ab_0 conda-forge xz 5.2.6 h57fd34a_0 conda-forge yaml 0.2.5 h3422bc3_2 conda-forge zeromq 4.3.4 hbdafb3b_1 conda-forge zipp 3.16.2 pyhd8ed1ab_0 conda-forge zlib 1.2.13 h53f4e23_5 conda-forge zstd 1.5.2 h4f39d0f_7 conda-forge ``` ### pip list ``` Package Version ----------------------------- ----------- affine 2.4.0 anyio 3.7.1 appnope 0.1.3 argon2-cffi 21.3.0 argon2-cffi-bindings 21.2.0 asttokens 2.2.1 async-lru 2.0.3 attrs 23.1.0 Babel 2.12.1 backcall 0.2.0 backports.functools-lru-cache 1.6.5 beautifulsoup4 4.12.2 bleach 6.0.0 branca 0.6.0 Brotli 1.0.9 Cartopy 0.21.1 certifi 2023.5.7 cffi 1.15.1 charset-normalizer 3.2.0 click 8.1.6 click-plugins 1.1.1 cligj 0.7.2 comm 0.1.3 contourpy 1.1.0 cycler 0.11.0 debugpy 1.6.7 decorator 5.1.1 defusedxml 0.7.1 entrypoints 0.4 et-xmlfile 1.1.0 exceptiongroup 1.1.2 executing 1.2.0 fastjsonschema 2.17.1 Fiona 1.9.4 flit_core 3.9.0 folium 0.14.0 fonttools 4.41.0 GDAL 3.7.0 geopandas 0.13.2 idna 3.4 importlib-metadata 6.8.0 importlib-resources 6.0.0 ipykernel 6.24.0 ipython 8.14.0 jedi 0.18.2 Jinja2 3.1.2 joblib 1.3.0 json5 0.9.14 jsonschema 4.18.4 jsonschema-specifications 2023.7.1 jupyter_client 8.3.0 jupyter_core 5.3.1 jupyter-events 0.6.3 jupyter-lsp 2.2.0 jupyter_server 2.7.0 jupyter_server_terminals 0.4.4 jupyterlab 4.0.3 jupyterlab-pygments 0.2.2 jupyterlab_server 2.23.0 kiwisolver 1.4.4 mapclassify 2.5.0 MarkupSafe 2.1.3 matplotlib 3.7.2 matplotlib-inline 0.1.6 mistune 3.0.0 munch 4.0.0 munkres 1.1.4 nbclient 0.8.0 nbconvert 7.7.1 nbformat 5.9.1 nest-asyncio 1.5.6 networkx 3.1 notebook_shim 0.2.3 numpy 1.25.1 openpyxl 3.1.2 overrides 7.3.1 packaging 23.1 pandas 2.0.3 pandocfilters 1.5.0 parso 0.8.3 patsy 0.5.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 10.0.0 pip 23.2 pkgutil_resolve_name 1.3.10 platformdirs 3.9.1 pooch 1.7.0 prometheus-client 0.17.1 prompt-toolkit 3.0.39 psutil 5.9.5 ptyprocess 0.7.0 pure-eval 0.2.2 pycparser 2.21 Pygments 2.15.1 pyobjc-core 9.2 pyobjc-framework-Cocoa 9.2 pyparsing 3.0.9 pyproj 3.6.0 pyshp 2.3.1 PySocks 1.7.1 python-dateutil 2.8.2 python-json-logger 2.0.7 pytz 2023.3 PyYAML 6.0 pyzmq 25.1.0 rasterio 1.3.8 referencing 0.30.0 regionmask 0.10.0 requests 2.31.0 rfc3339-validator 0.1.4 rfc3986-validator 0.1.1 rioxarray 0.14.1 rpds-py 0.9.2 Rtree 1.0.1 scikit-learn 1.3.0 scipy 1.11.1 seaborn 0.12.2 Send2Trash 1.8.2 setuptools 68.0.0 shapely 2.0.1 six 1.16.0 sniffio 1.3.0 snuggs 1.4.7 soupsieve 2.3.2.post1 stack-data 0.6.2 statsmodels 0.14.0 terminado 0.17.1 threadpoolctl 3.2.0 tinycss2 1.2.1 tomli 2.0.1 tornado 6.3.2 traitlets 5.9.0 typing_extensions 4.7.1 typing-utils 0.1.0 tzdata 2023.3 urllib3 2.0.3 wcwidth 0.2.6 webencodings 0.5.1 websocket-client 1.6.1 wheel 0.40.0 xarray 2023.7.0 xyzservices 2023.7.0 zipp 3.16.2 ```
greglucas commented 1 year ago

Closing as a duplicate of https://github.com/SciTools/cartopy/issues/2199. The fix for this will be coming out in the next release. Another option is to install pykdtree for now which avoids the Scipy error and gives you a speedup as well.

e5k commented 1 year ago

Brilliant, apologies for missing on the existing issue. And - by the way - thanks for the library!