Skip to content

Commit

Permalink
Fix docs (#364)
Browse files Browse the repository at this point in the history
* Specify language to silence warning

* Add missing reference

* Matplotlib's cm.get_map() has been deprecated
  • Loading branch information
dnerini committed Jun 15, 2024
1 parent 10416e4 commit 2bc6b38
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def get_version():
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
2 changes: 1 addition & 1 deletion examples/optical_flow_methods_convergence.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import matplotlib.pyplot as plt
import numpy as np
from matplotlib.cm import get_cmap
from matplotlib.pyplot import get_cmap
from scipy.ndimage import uniform_filter

import pysteps as stp
Expand Down
3 changes: 3 additions & 0 deletions pysteps/nowcasts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ def compute_percentile_mask(precip, pct):
"""Compute a precipitation mask, where True/False values are assigned for
pixels above/below the given percentile.
.. _ndarray:\
https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html
Parameters
----------
precip: array_like
Expand Down
4 changes: 2 additions & 2 deletions pysteps/visualization/precipfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import matplotlib.pylab as plt
import numpy as np
from matplotlib import cm, colors
from matplotlib import pyplot, colors

from pysteps.visualization.utils import get_geogrid, get_basemap_axis

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

return cm.get_cmap("jet"), colors.Normalize(), None, None
return pyplot.get_cmap("jet"), colors.Normalize(), None, None


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

0 comments on commit 2bc6b38

Please sign in to comment.