Use double underscore
@@ -6,13 +6,13 @@ from keanu.vartypes import numpy_types
from math import log, floor
from numpy import ndarray
-def _create_new_mpl() -> Tuple[Any, Any]:
+def __create_new_mpl() -> Tuple[Any, Any]:
fig = plt.figure()
ax = fig.add_subplot(111)
return fig, ax
-def _plot_corr(ax: Any, acf_x: ndarray, nlags: int, **kwargs: Any) -> None:
+def __plot_corr(ax: Any, acf_x: ndarray, nlags: int, **kwargs: Any) -> None:
ax.vlines(np.arange(nlags), [0], acf_x)
kwargs.setdefault('marker', 'o')
kwargs.setdefault('markersize', 5)
@@ -28,8 +28,8 @@ def _calc_max_lag(data_len: int) -> int:
def plot_acf(data: List[numpy_types], index: Tuple[int, ...] = (), nlags: int = None) -> Any:
autocorr = stats.autocorrelation(data, index)
- fig, ax = _create_new_mpl()
+ fig, ax = __create_new_mpl()
if nlags is None:
nlags = _calc_max_lag(len(autocorr))
- _plot_corr(ax, autocorr, nlags)
+ __plot_corr(ax, autocorr, nlags)
return fig
