Skip to content

clear_data_home

yohou.datasets._fetchers.clear_data_home(data_home=None)

Delete all the content of the data home cache.

Parameters

Name Type Description Default
data_home str, PathLike, or None

The path to the data directory. If None, the default path is ~/yohou_data.

None

See Also

Source Code

Show/Hide source
def clear_data_home(data_home: str | os.PathLike | None = None) -> None:
    """Delete all the content of the data home cache.

    Parameters
    ----------
    data_home : str, PathLike, or None
        The path to the data directory. If ``None``, the default path
        is ``~/yohou_data``.

    See Also
    --------
    - [`get_data_home`][yohou.datasets._fetchers.get_data_home] : Return the path of the data directory.

    """
    data_home = get_data_home(data_home)
    shutil.rmtree(data_home)