From 6d231a93982ac7f5541ee77bf8aa9fadfe6617a3 Mon Sep 17 00:00:00 2001 From: Jarrod Millman Date: Sun, 23 Sep 2007 14:36:47 +0000 Subject: one more try --- numpy/doc/html/example-pysrc.html | 208 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 208 insertions(+) create mode 100644 numpy/doc/html/example-pysrc.html (limited to 'numpy/doc/html/example-pysrc.html') diff --git a/numpy/doc/html/example-pysrc.html b/numpy/doc/html/example-pysrc.html new file mode 100644 index 000000000..f1b8bfba5 --- /dev/null +++ b/numpy/doc/html/example-pysrc.html @@ -0,0 +1,208 @@ + + + + + example + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Module example + + + + + + +
[hide private]
[frames] | no frames]
+
+

Source Code for Module example

+
+  1  """This is the docstring for the example.py module.  Modules names should 
+  2  have short, all-lowercase names.  The module name may have underscores if 
+  3  this improves readability. 
+  4   
+  5  Every module should have a docstring at the very top of the file.  The 
+  6  module's docstring may extend over multiple lines.  If your docstring does 
+  7  extend over multiple lines, the closing three quotation marks must be on 
+  8  a line by itself, preferably preceeded by a blank line. 
+  9   
+ 10  """ 
+ 11   
+ 12  import os                      # standard library imports first 
+ 13   
+ 14  import numpy as np             # related third party imports next 
+ 15  import scipy as sp             # imports should be at the top of the module 
+ 16  import matplotlib as mpl       # imports should usually be on separate lines 
+ 17   
+ 18   
+ 19  __docformat__ = "restructuredtext en" 
+ 20   
+ 21   
+
22 -def foo(var1, var2, long_var_name='hi') : +
23 """One-line summary or signature. + 24 + 25 Several sentences providing an extended description. You can put + 26 text in mono-spaced type like so: ``var``. + 27 + 28 *Parameters*: + 29 + 30 var1 : {array_like} + 31 Array_like means all those objects -- lists, nested lists, etc. -- + 32 that can be converted to an array. + 33 var2 : {integer} + 34 Write out the full type + 35 long_variable_name : {'hi', 'ho'}, optional + 36 Choices in brackets, default first when optional. + 37 + 38 *Returns*: + 39 + 40 named : {type} + 41 Explanation + 42 list + 43 Explanation + 44 of + 45 Explanation + 46 outputs + 47 even more explaining + 48 + 49 *Other Parameters*: + 50 + 51 only_seldom_used_keywords : type + 52 Explanation + 53 common_parametrs_listed_above : type + 54 Explanation + 55 + 56 *See Also*: + 57 + 58 `otherfunc` : relationship (optional) + 59 + 60 `newfunc` : relationship (optional) + 61 + 62 *Notes* + 63 + 64 Notes about the implementation algorithm (if needed). + 65 + 66 This can have multiple paragraphs as can all sections. + 67 + 68 *Examples* + 69 + 70 examples in doctest format + 71 + 72 >>> a=[1,2,3] + 73 >>> [x + 3 for x in a] + 74 [4, 5, 6] + 75 + 76 """ + 77 + 78 pass +
79 + 80 +
81 -def newfunc() : +
82 """Do nothing. + 83 + 84 I never saw a purple cow. + 85 + 86 """ + 87 + 88 pass +
89 + 90 +
91 -def otherfunc() : +
92 """Do nothing. + 93 + 94 I never hope to see one. + 95 + 96 """ + 97 + 98 pass +
99 +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + -- cgit v1.2.1