L iuddlmZddlmZddlmZddlmZmZm Z m Z ddl m Z m Z ddlZddlmZddlZ ddlZej(Zd ZGd d Zd Zy#e$r edwxYw) )registry) data_fetcher) _clear_cache)ascentfaceelectrocardiogram download_all) assert_equalassert_almost_equalN) get_identzsMissing optional dependency 'pooch' required for scipy.datasets module. Please use pip or conda to install 'pooch'.crtjj|sytj||k(S)z1Check if the provided path has the expected hash.F)ospathexistspooch file_hash)r expected_hashs d/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/scipy/datasets/tests/test_data.py _has_hashrs) 77>>$  ??4 M 11ceZdZejdddZej jddZdZ dZ d Z y ) TestDatasetsmoduleT)scopeautousec#(KtdywN)r selfs rtest_download_allzTestDatasets.test_download_alls  s clttjtttk\sJyr)lenrlistdirdata_dirrrs rtest_existence_allzTestDatasets.test_existence_all's"2::h'(CM999rcttjdttj j tdtdsJy)N)r(z ascent.dat) r rshaperrrjoinr%rrs r test_ascentzTestDatasets.test_ascent+s?VX^^Z0h =!,/1 11rcttjdttj j tdtdsJy)N)iizface.dat) r rr)rrrr*r%rrs r test_facezTestDatasets.test_face2s?TV\\>2h ;!*-/ //rcNt}t|jtt|jdt |j dt |jdttjjtdtdsJy)N)igGĔH"ſg-?zecg.dat)rr dtypefloatr)r meanstdrrrr*r%r)recgs rtest_electrocardiogramz#TestDatasets.test_electrocardiogram9st!SYY&SYY *CHHJ 4CGGI'9:h :!),. ..rN) __name__ __module__ __qualname__pytestfixturer mark fail_slowr&r+r.r5rrrrsSV^^(D12 [[2::1/ .rrc|ttz }|j|dz }|ji}tdD])}d|dg|d|<|d|dz }|j d+d}t |||t jj|dz rJd }d }t ||g||t jj|d z rJt jj|d z rJd } |dz j d|dz j dddg|d<t | g||t jj|dz rJt jj|dz rJd} tjt5t | g||dddt d|t jj|rJy#1swY8xYw)Ndummy_cache_dirdataz.datcyrr=r=rrdata0ztest_clear_cache..data0W r)datasets cache_dir method_mapz data0.datcyrr=r=rrdata1ztest_clear_cache..data1^rErcyrr=r=rrdata2ztest_clear_cache..data2arErz data1.datz data2.datcyrr=r=rrdata4ztest_clear_cache..data4jrErz data4_0.datz data4_1.datrNcyrr=r=rrdata5ztest_clear_cache..data5xrEr)rFrG) strr mkdirrange write_textrrrrr9raises ValueError) tmp_paththread_basepathdummy_basepathdummy_method_mapi data_filepathrDrJrLrNrPs rtest_clear_cacher]FsY[!11O$'88N 1X%*.qc'74s$&4s$7   $% %>,.ww~~n[899 9  5%.N,.ww~~n[899 9ww~~n[899 9 m#//3m#//3!. >W5'^,.ww~~n]:;; ;ww~~n]:;; ; z "2ug 0 22 $.9ww~~n-- -- 22s -G44G=)scipy.datasets._registryrscipy.datasets._fetchersrscipy.datasets._utilsrscipy.datasetsrrrr numpy.testingr r r threadingr r9r ImportErrorrr%rrr]r=rrresn-1.HH;  3   2'.'.T:.u3 2 333s AA%