diff options
author | Hind-M <hind.montassif@gmail.com> | 2021-06-02 11:30:09 +0200 |
---|---|---|
committer | Hind-M <hind.montassif@gmail.com> | 2021-06-02 11:30:09 +0200 |
commit | c2f0cf79af04ea3586a70c0a121a200353e989ac (patch) | |
tree | dbd994ebc9a34a13914b8bc51a5165466be91e73 /src/python/gudhi/datasets/remote.py | |
parent | f0c12fbdce04d09bf13b141d549e5e385c64caad (diff) |
Add wrapping function to fecth spiral_2d.csv directly
Diffstat (limited to 'src/python/gudhi/datasets/remote.py')
-rw-r--r-- | src/python/gudhi/datasets/remote.py | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/src/python/gudhi/datasets/remote.py b/src/python/gudhi/datasets/remote.py index 27076785..4a300b15 100644 --- a/src/python/gudhi/datasets/remote.py +++ b/src/python/gudhi/datasets/remote.py @@ -46,11 +46,11 @@ def fetch(url, filename, dirname = "remote_datasets", checksum_flag = False, fil Parameters ---------- url : string - The url to fetch the dataset from + The url to fetch the dataset from. filename : string - The filename to download + The name to give to downloaded file. dirname : string - The directory to save the file to. + The directory to save the file to. Default is "remote_datasets". checksum_flag : boolean To set if the user wants the file checksum. Default is 'False'. Note that if checksum_flag is set to 'True', the file_checksum must be provided. @@ -83,3 +83,21 @@ def fetch(url, filename, dirname = "remote_datasets", checksum_flag = False, fil file_checksum)) return file_path + +def fetch_spiral_2d(filename = "spiral_2d.csv", dirname = "remote_datasets"): + """ + Fetch spiral_2d.csv remotely + + Parameters + ---------- + filename : string + The name to give to downloaded file. Default is "spiral_2d.csv" + dirname : string + The directory to save the file to. Default is "remote_datasets". + + Returns + ------- + file_path: string + Full path of the created file. + """ + return fetch("https://raw.githubusercontent.com/Hind-M/gudhi-data/main/spiral_2d.csv", filename, dirname, True, '37530355d980d957c4ec06b18c775f90a91e446107d06c6201c9b4000b077f38') |