Skip to content

Commit

Permalink
update documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
AGrigis committed Oct 18, 2019
1 parent 74b95a8 commit 9aec8ec
Show file tree
Hide file tree
Showing 9 changed files with 127 additions and 131 deletions.
4 changes: 2 additions & 2 deletions pysap/base/loaders/fits.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ def load(self, path):
path: str
the path to the image to be loaded.
Return
------
Returns
-------
image: Image
the loaded image.
"""
Expand Down
12 changes: 6 additions & 6 deletions pysap/base/loaders/loader_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def can_load(self, path):
path: str
the path to the image to be loaded.
Return
------
Returns
-------
out: bool
True if the file extension is valid, False otherwise.
"""
Expand All @@ -39,8 +39,8 @@ def load(self, path):
path: str
the path to the image to be loaded.
Return
------
Returns
-------
image: Image
the loaded image.
"""
Expand All @@ -55,8 +55,8 @@ def can_save(self, outpath):
outpath: str
the path where the the image will be saved.
Return
------
Returns
-------
out: bool
True if the output file extension is valid, False otherwise.
"""
Expand Down
4 changes: 2 additions & 2 deletions pysap/base/loaders/mat.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ def load(self, path, image_field="image", meta_field="metadata"):
image_field: str, default 'metadata'
the name of the data field that contains the image metadata.
Return
------
Returns
-------
image: Image
the loaded image.
"""
Expand Down
4 changes: 2 additions & 2 deletions pysap/base/loaders/nifti.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def load(self, path):
path: str
the path to the image to be loaded.
Return
------
Returns
-------
image: Image
the loaded image.
"""
Expand Down
4 changes: 2 additions & 2 deletions pysap/base/loaders/numpy_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def load(self, path):
path: str
the path to the image to be loaded.
Return
------
Returns
-------
image: Image
the loaded image.
"""
Expand Down
3 changes: 1 addition & 2 deletions pysap/base/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def load_module(self, name):
of the module/package that was requested.
"""
# Load the module
module = imp.load_module(name, self.file, self.filename,
self.stuff)
module = imp.load_module(name, self.file, self.filename, self.stuff)
if self.file:
self.file.close()

Expand Down
10 changes: 3 additions & 7 deletions pysap/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,7 @@ class ResumeURLOpener(FancyURLopener):
partial file is being sent, which is fine in this case.
Do nothing with this error.
Note
----
This was adapted from:
Note: This was adapted from:
http://code.activestate.com/recipes/83208-resuming-download-of-a-file/
"""
def __init__(self):
Expand Down Expand Up @@ -248,10 +246,8 @@ def download_file(url, data_dir, resume=True, overwrite=False, verbose=0):
download_fname: str
absolute path to the downloaded file.
Notes
-----
If, for any reason, the download procedure fails, all downloaded files are
removed.
Note: If, for any reason, the download procedure fails, all downloaded
files are removed.
"""
# Create the download directory if necessary
if not os.path.exists(data_dir):
Expand Down
Loading

0 comments on commit 9aec8ec

Please sign in to comment.