Skip to main content
`Ctrl`+`K`
scipy.datasets.

# clear_cache

scipy.datasets.clear_cache(datasets=None)

  Cleans the scipy datasets cache directory.

  If a scipy.datasets method or a list/tuple of the same is provided, then clear_cache removes all the data files associated to the passed dataset method callable(s).

  By default, it removes all the cached data files.

  Parameters:
    datasets callable or list/tuple of callable or None

  Notes

  Array API Standard Support

  `clear_cache` is not in-scope for support of Python Array API Standard compatible backends other than NumPy.

  See Support for the array API standard for more information.

  Examples

      >>> from scipy import datasets
      >>> ascent_array = datasets.ascent()
      >>> ascent_array.shape
      (512, 512)
      >>> datasets.clear_cache([datasets.ascent])
      Cleaning the file ascent.dat for dataset ascent