-
Notifications
You must be signed in to change notification settings - Fork 63
/
example_numpydoc.py.patch
169 lines (154 loc) · 3.34 KB
/
example_numpydoc.py.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# Patch generated by Pyment v0.4.0dev
--- a/example.py
+++ b/example.py
@@ -1,54 +1,108 @@
def func1(param1: str, param2='default val'):
- '''Description of func with docstring javadoc style.
+ """Description of func with docstring javadoc style.
- @param param1: descr of param
- @type param1: type
- @return: some value
- @raise KeyError: raises a key exception
+ Parameters
+ ----------
+ param1 : str
+ descr of param
+ param2 :
+ (Default value = 'default val')
- '''
+ Returns
+ -------
+ type
+ some value
+
+ Raises
+ ------
+ KeyError
+ raises a key exception
+
+ """
pass
def func2(param1, param2='default val2') -> list:
- '''Description of func with docstring reST style.
+ """Description of func with docstring reST style.
- :param param1: descr of param
- :type param1: type
- :returns: some value
- :raises keyError: raises exception
+ Parameters
+ ----------
+ param1 : type
+ descr of param
+ param2 :
+ (Default value = 'default val2')
- '''
+ Returns
+ -------
+ list
+ some value
+
+ Raises
+ ------
+ keyError
+ raises exception
+
+ """
pass
def func3(param1, param2='default val'):
- '''Description of func with docstring groups style.
+ """Description of func with docstring groups style.
- Params:
- param1 - descr of param
+ Parameters
+ ----------
+ param1 :
+ descr of param
+ param2 :
+ (Default value = 'default val')
- Returns:
+ Returns
+ -------
+ type
some value
- Raises:
- keyError: raises key exception
- TypeError: raises type exception
+ Raises
+ ------
+ keyError
+ raises key exception
+ TypeError
+ raises type exception
- '''
+ """
pass
class SomeClass(object):
- '''My class.
- '''
+ """My class."""
def method(self, prm):
- '''description'''
+ """description
+
+ Parameters
+ ----------
+ prm :
+
+
+ Returns
+ -------
+
+ """
pass
def method2(self, prm1, prm2='defaultprm'):
+ """
+
+ Parameters
+ ----------
+ prm1 :
+
+ prm2 :
+ (Default value = 'defaultprm')
+
+ Returns
+ -------
+
+ """
pass
def method_numpy(self):
- """
- My numpydoc description of a kind
+ """My numpydoc description of a kind
of very exhautive numpydoc format docstring.
Parameters
@@ -77,27 +131,24 @@
a_func : linked (optional), with things to say
on several lines
some blabla
-
+
Note
----
Some informations.
-
+
Some maths also:
.. math:: f(x) = e^{- x}
-
References
----------
Biblio with cited ref [1]_. The ref can be cited in Note section.
-
+
.. [1] Adel Daouzli, Sylvain Saïghi, Michelle Rudolph, Alain Destexhe,
Sylvie Renaud: Convergence in an Adaptive Neural Network:
The Influence of Noise Inputs Correlation. IWANN (1) 2009: 140-148
-
Examples
--------
This is example of use
>>> print "a"
a
-
"""
pass