Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bo Zhang
csst
Commits
29572529
Commit
29572529
authored
Mar 24, 2022
by
BO ZHANG
🏀
Browse files
Chinese does not get along well with rtfd.io
parent
536ff8d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/source/csster.rst
View file @
29572529
csster的自我修养
Guidelines to developers
==============
==============
==========
docstring
docstring
---------
---------
`csst`将使用numpy风格的
docstring
,参考链接:
https://numpydoc.readthedocs.io/en/latest/format.html
We adopt the *numpy* style
docstring
(see:
https://numpydoc.readthedocs.io/en/latest/format.html
)
例如
numpy.cos()
函数的文档
An example: the docstring of
numpy.cos()
.. code-block:: python
.. code-block:: python
...
@@ -33,11 +33,13 @@ docstring
...
@@ -33,11 +33,13 @@ docstring
**kwargs
**kwargs
For other keyword-only arguments, see the
For other keyword-only arguments, see the
:ref:`ufunc docs <ufuncs.kwargs>`.
:ref:`ufunc docs <ufuncs.kwargs>`.
Returns
Returns
-------
-------
y : ndarray
y : ndarray
The corresponding cosine values.
The corresponding cosine values.
This is a scalar if `x` is a scalar.
This is a scalar if `x` is a scalar.
Notes
Notes
-----
-----
If `out` is provided, the function writes the result into it,
If `out` is provided, the function writes the result into it,
...
@@ -46,6 +48,7 @@ docstring
...
@@ -46,6 +48,7 @@ docstring
----------
----------
M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions.
M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions.
New York, NY: Dover, 1972.
New York, NY: Dover, 1972.
Examples
Examples
--------
--------
np.cos(np.array([0, np.pi/2, np.pi]))
np.cos(np.array([0, np.pi/2, np.pi]))
...
@@ -73,6 +76,7 @@ docstring
...
@@ -73,6 +76,7 @@ docstring
The broadcasting rules are:
The broadcasting rules are:
* Dimensions of length 1 may be prepended to either array.
* Dimensions of length 1 may be prepended to either array.
* Arrays may be repeated along dimensions of length 1.
* Arrays may be repeated along dimensions of length 1.
Parameters
Parameters
----------
----------
*x : array_like
*x : array_like
...
@@ -92,6 +96,7 @@ docstring
...
@@ -92,6 +96,7 @@ docstring
remain uninitialized.
remain uninitialized.
**kwargs
**kwargs
For other keyword-only arguments, see the :ref:`ufunc docs <ufuncs.kwargs>`.
For other keyword-only arguments, see the :ref:`ufunc docs <ufuncs.kwargs>`.
Returns
Returns
-------
-------
r : ndarray or tuple of ndarray
r : ndarray or tuple of ndarray
...
@@ -107,14 +112,9 @@ docstring
...
@@ -107,14 +112,9 @@ docstring
`logging`
`logging`
---------
---------
利用 `logging` 模块代替print进行输出提示
Use `logging` module to print verbose info.
环境变量
-------
规定程序运行的环境变量
Environment variables
---------------------
Define some environment variables for testing.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment