Skip to content

Commit 01eb0bd

Browse files
changed docstring and small optimization
1 parent 94bc45d commit 01eb0bd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

climada/util/plot.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,11 @@ def geo_im_from_array(
375375
-------
376376
cartopy.mpl.geoaxes.GeoAxesSubplot
377377
378+
Notes
379+
-----
380+
Data points with NaN or inf are plotted in gray. White regions correspond to
381+
regions outside the convex hull of the given coordinates.
382+
378383
Raises
379384
------
380385
ValueError
@@ -472,7 +477,7 @@ def geo_im_from_array(
472477
)
473478
# handle NaNs in griddata
474479
color_nan = "gainsboro"
475-
if np.any(np.isnan(grid_im)):
480+
if np.any(np.isnan(x) for x in grid_im):
476481
no_data_patch = mpatches.Patch(
477482
facecolor=color_nan, edgecolor="black", label="NaN"
478483
)

0 commit comments

Comments
 (0)