@@ -116,7 +116,29 @@ The sections of the docstring are:
116
116
117
117
"""
118
118
119
- 2. **Extended summary **
119
+ 2. **Deprecation warning **
120
+
121
+ A section (use if applicable) to warn users that the object is deprecated.
122
+ Section contents should include:
123
+
124
+ * In what Numpy version the object was deprecated, and when it will be
125
+ removed.
126
+
127
+ * Reason for deprecation if this is useful information (e.g., object
128
+ is superseded, duplicates functionality found elsewhere, etc.).
129
+
130
+ * New recommended way of obtaining the same functionality.
131
+
132
+ This section should use the note Sphinx directive instead of an
133
+ underlined section header.
134
+
135
+ ::
136
+
137
+ .. note:: Deprecated in Numpy 1.6
138
+ `ndobj_old` will be removed in Numpy 2.0, it is replaced by
139
+ `ndobj_new` because the latter works also with array subclasses.
140
+
141
+ 3. **Extended summary **
120
142
121
143
A few sentences giving an extended description. This section
122
144
should be used to clarify *functionality *, not to discuss
@@ -125,7 +147,7 @@ The sections of the docstring are:
125
147
parameters and the function name, but parameter descriptions still
126
148
belong in the **parameters ** section.
127
149
128
- 3 . **Parameters **
150
+ 4 . **Parameters **
129
151
130
152
Description of the function arguments, keywords and their
131
153
respective types.
@@ -177,18 +199,18 @@ The sections of the docstring are:
177
199
x1, x2 : array_like
178
200
Input arrays, description of `x1`, `x2`.
179
201
180
- 4 . **Returns **
202
+ 5 . **Returns **
181
203
182
204
Explanation of the returned values and their types, of the same
183
205
format as **parameters **.
184
206
185
- 5 . **Other parameters **
207
+ 6 . **Other parameters **
186
208
187
209
An optional section used to describe infrequently used parameters.
188
210
It should only be used if a function has a large number of keyword
189
211
prameters, to prevent cluttering the **parameters ** section.
190
212
191
- 6 . **Raises **
213
+ 7 . **Raises **
192
214
193
215
An optional section detailing which errors get raised and under
194
216
what conditions::
@@ -201,7 +223,7 @@ The sections of the docstring are:
201
223
This section should be used judiciously, i.e only for errors
202
224
that are non-obvious or have a large chance of getting raised.
203
225
204
- 7 . **See Also **
226
+ 8 . **See Also **
205
227
206
228
An optional section used to refer to related code. This section
207
229
can be very useful, but should be used judiciously. The goal is to
@@ -240,7 +262,7 @@ The sections of the docstring are:
240
262
func_b, func_c_, func_d
241
263
func_e
242
264
243
- 8 . **Notes **
265
+ 9 . **Notes **
244
266
245
267
An optional section that provides additional information about the
246
268
code, possibly including a discussion of the algorithm. This
@@ -285,7 +307,7 @@ The sections of the docstring are:
285
307
where filename is a path relative to the reference guide source
286
308
directory.
287
309
288
- 9 . **References **
310
+ 10 . **References **
289
311
290
312
References cited in the **notes ** section may be listed here,
291
313
e.g. if you cited the article below using the text ``[1]_ ``,
@@ -310,7 +332,7 @@ The sections of the docstring are:
310
332
should not be required to understand it. References are numbered, starting
311
333
from one, in the order in which they are cited.
312
334
313
- 10 . **Examples **
335
+ 11 . **Examples **
314
336
315
337
An optional section for examples, using the `doctest
316
338
<http://www.python.org/doc/lib/module-doctest.html> `_ format.
@@ -512,7 +534,7 @@ output. New paragraphs are marked with a blank line.
512
534
Use *italics *, **bold **, and ``courier `` if needed in any explanations
513
535
(but not for variable names and doctest code or multi-line code).
514
536
Variable, module and class names should be written between single
515
- backticks (```numpy` ``).
537
+ back-ticks (```numpy` ``).
516
538
517
539
A more extensive example of reST markup can be found in `this example
518
540
document <http://docutils.sourceforge.net/docs/user/rst/demo.txt> `_;
0 commit comments