Skip to content

Commit

Permalink
docs: doctest format for example in docstring
Browse files Browse the repository at this point in the history
Re-writing example in docstring to use [doctest format](https://numpydoc.readthedocs.io/en/latest/format.html#examples).
  • Loading branch information
ns-rse authored and SylviaWhittle committed May 1, 2024
1 parent 26598d2 commit 2d8dcf1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions topofileformats/spm.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,11 @@ def load_spm(file_path: Path | str, channel: str) -> tuple:
Examples
--------
```python
from topofileformats.spm import load_spm
image, pixel_to_nm = load_spm(file_path="path/to/file.spm", channel="Height")
Load the image and pixel to nanometre scaling factor, available channels are 'Height', 'ZSensor' and 'Height
Sensor'.
>>> from topofileformats.spm import load_spm
>>> image, pixel_to_nm = load_spm(file_path="path/to/file.spm", channel="Height")
```
"""
logger.info(f"Loading image from : {file_path}")
Expand Down

0 comments on commit 2d8dcf1

Please sign in to comment.