From be848da488af0323275c1edc20369000a2c4457d Mon Sep 17 00:00:00 2001 From: BO ZHANG Date: Thu, 25 Aug 2022 17:16:38 +0800 Subject: [PATCH] added example.py --- README.md | 1 + examples/how_to_write_docstring.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/README.md b/README.md index 52b0b0f..11c2893 100644 --- a/README.md +++ b/README.md @@ -118,6 +118,7 @@ The `csst_proto` uses an awesome algorithm based on `numpy.ndarray` indices to f - Numpydoc: https://numpydoc.readthedocs.io/en/latest/format.html - for C: https://peps.python.org/pep-0007/ - for Python: https://peps.python.org/pep-0008/ + - example.py: https://numpydoc.readthedocs.io/en/latest/example.html#example - `unittest`: https://docs.python.org/3.8/library/unittest.html - gitlab CI/CD pipeline: https://docs.gitlab.com/ee/ci/pipelines/ - gitlab runners: https://docs.gitlab.com/runner/ diff --git a/examples/how_to_write_docstring.py b/examples/how_to_write_docstring.py index 2b7a6ff..8f75b66 100644 --- a/examples/how_to_write_docstring.py +++ b/examples/how_to_write_docstring.py @@ -34,5 +34,10 @@ def cos(x: float = 0.) -> float: Notes ----- this function is a warpper of `numpy.cos()` + + Conf + ---- + https://numpydoc.readthedocs.io/en/latest/example.html#example + """ return np.cos(x) -- GitLab