Skip to content

Commit d4864da

Browse files
authored
Fix two docs build issues (#698)
- Replace deprecated matplotlib.cm.get_cmap with plt.get_cmap in the shapelet distances example. - Fix RST bullet list formatting in UCR_UEA_datasets docstring (missing blank line before list caused a docutils "Unexpected indentation" error).
1 parent 4cf2840 commit d4864da

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/examples/classification/plot_shapelet_distances.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
from keras.optimizers import Adam
2929
import numpy
30-
from matplotlib import cm
3130
import matplotlib.pyplot as plt
3231

3332
from tslearn.datasets import CachedDatasets
@@ -62,7 +61,7 @@
6261
weights, biases = shp_clf.get_weights('classification')
6362

6463
# Create a grid for our two shapelets on the left and distances on the right
65-
viridis = cm.get_cmap('viridis', 4)
64+
viridis = plt.get_cmap('viridis', 4)
6665
fig = plt.figure(constrained_layout=True)
6766
gs = fig.add_gridspec(3, 9)
6867
fig_ax1 = fig.add_subplot(gs[0, :2])

tslearn/datasets/ucr_uea.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,10 @@ class UCR_UEA_datasets:
5454
root_dir : str or None (default: None)
5555
Directory to be used to cache downloaded datasets.
5656
If None, a default directory is used:
57-
- If the environment variable `XDG_DATA_HOME` is set, the default
58-
directory is `$XDG_DATA_HOME/tslearn/UCR_UEA`.
59-
- Otherwise, the default directory is `~/.tslearn/datasets/UCR_UEA`.
57+
58+
- If the environment variable `XDG_DATA_HOME` is set, the default
59+
directory is `$XDG_DATA_HOME/tslearn/UCR_UEA`.
60+
- Otherwise, the default directory is `~/.tslearn/datasets/UCR_UEA`.
6061
6162
Notes
6263
-----

0 commit comments

Comments
 (0)