Skip to content

Commit 2bc6b38

Browse files
authored
Fix docs (#364)
* Specify language to silence warning * Add missing reference * Matplotlib's cm.get_map() has been deprecated
1 parent 10416e4 commit 2bc6b38

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

doc/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def get_version():
8585
#
8686
# This is also used if you do content translation via gettext catalogs.
8787
# Usually you set "language" from the command line for these cases.
88-
language = None
88+
language = "en"
8989

9090
# List of patterns, relative to source directory, that match files and
9191
# directories to ignore when looking for source files.

examples/optical_flow_methods_convergence.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
import matplotlib.pyplot as plt
2424
import numpy as np
25-
from matplotlib.cm import get_cmap
25+
from matplotlib.pyplot import get_cmap
2626
from scipy.ndimage import uniform_filter
2727

2828
import pysteps as stp

pysteps/nowcasts/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def compute_percentile_mask(precip, pct):
103103
"""Compute a precipitation mask, where True/False values are assigned for
104104
pixels above/below the given percentile.
105105
106+
.. _ndarray:\
107+
https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html
108+
106109
Parameters
107110
----------
108111
precip: array_like

pysteps/visualization/precipfields.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import matplotlib.pylab as plt
1818
import numpy as np
19-
from matplotlib import cm, colors
19+
from matplotlib import pyplot, colors
2020

2121
from pysteps.visualization.utils import get_geogrid, get_basemap_axis
2222

@@ -294,7 +294,7 @@ def get_colormap(ptype, units="mm/h", colorscale="pysteps"):
294294
clevs_str = [f"{clev:.1f}" for clev in clevs]
295295
return cmap, norm, clevs, clevs_str
296296

297-
return cm.get_cmap("jet"), colors.Normalize(), None, None
297+
return pyplot.get_cmap("jet"), colors.Normalize(), None, None
298298

299299

300300
def _get_colorlist(units="mm/h", colorscale="pysteps"):

0 commit comments

Comments
 (0)