tsaug icon indicating copy to clipboard operation
tsaug copied to clipboard

Missing function calls in documentation

Open 15bubbles opened this issue 3 years ago • 0 comments

Hi!

I noticed that documentation is actually missing few important notes.

For instance, first example contains such snippet:

>>> import numpy as np
>>> X = np.load("./X.npy")
>>> Y = np.load("./Y.npy")
>>> from tsaug.visualization import plot
>>> plot(X, Y)

and shows a chart which suggests that it is immediately rendered after calling plot function.

In configurations I've seen and worked on, plot function does not render any chart immediately. Instead it returns Tuple[matplotlib.figure.Figure, matplotlib.axes._axes.Axes]. This means that we need to take first element of returned tuple and call .show() on it, so this example should rather be:

>>> import numpy as np
>>> X = np.load("./X.npy")
>>> Y = np.load("./Y.npy")
>>> from tsaug.visualization import plot
>>> figure, _ = plot(X, Y)
>>> figure.show()

I can create a push request with such corrections if you're open for contribution

15bubbles avatar Jun 14 '22 16:06 15bubbles