
    (ph                     Z    S SK r S SKrSSKJr   S SKrSS jrSS jrg! \ a    Sr Nf = f)    N   )method_files_mapc           
         Uc  [         nUc(  [        c  [        S5      e[        R                  " S5      n[        R
                  R                  U5      (       d  [        SU S35        g U c&  [        SU S35        [        R                  " U5        g [        U [        [        45      (       d  U /n U  GH  n[        U5      (       d   eUR                  nXB;  a(  [        SU S[        UR!                  5       5       35      eX$   nU Vs/ s H"  n[        R
                  R#                  X5      PM$     nnU H  n[        R
                  R                  U5      (       aI  [        S	[        R
                  R%                  U5      S
    SU 35        [        R&                  " U5        Mp  [        SU S35        M     GM
     g s  snf )NzsMissing optional dependency 'pooch' required for scipy.datasets module. Please use pip or conda to install 'pooch'.z
scipy-datazCache Directory z! doesn't exist. Nothing to clear.zCleaning the cache directory !zDataset method za doesn't exist. Please check if the passed dataset is a subset of the following dataset methods: zCleaning the file r   z for dataset zPath )r   platformdirsImportErroruser_cache_dirospathexistsprintshutilrmtree
isinstancelisttuplecallable__name__
ValueErrorkeysjoinsplitremove)	datasets	cache_dir
method_mapdatasetdataset_name
data_filesfiledata_filepathsdata_filepaths	            H/var/www/html/venv/lib/python3.13/site-packages/scipy/datasets/_utils.py_clear_cacher$      s   %
 : ; ; !//=	77>>)$$ +LMN-i[:;i (T5M22 |HGG$$$$"++L- ?<. A- .2*//2C-D,E"G H H
 $1J*46*4$ !ggll9;*4  6!/77>>-00.WW]]=9!<= >))58 9 IIm,E- 1. . / "0  6s   	)F?c                     [        U 5        g)a'  
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

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
N)r$   )r   s    r#   clear_cacher&   :   s    .     )NN)N)r
   r   	_registryr   r   r   r$   r&    r'   r#   <module>r*      s8    	  '
,/^g  Ls    **