~jtaylor/ubuntu/precise/python-numpy/multiarch-fix-818867

« back to all changes in this revision

Viewing changes to numpy/doc/html/example-pysrc.html

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik, Riku Voipio, Tiziano Zito, Carlos Galisteo, Ondrej Certik
  • Date: 2008-07-08 15:08:16 UTC
  • mfrom: (0.1.21 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080708150816-ekf992jcp2k1eua3
Tags: 1:1.1.0-3
[ Riku Voipio ]
* debian/control: atlas is not available on armel, and after a quick look
  neither on alpha. I'd also suggest dropping
  libatlas-sse-dev|libatlas-sse2-dev|libatlas-3dnow-dev alternative combo
  away, these are potentially dangerous on buildd's. Ondrej: dropped.
  (Closes: #489568)

[ Tiziano Zito ]
* patch: build _dotblas.c when ATLAS is not installed, build-conflict with
  atlas, build-depend on blas+lapack only, as it used to be (Closes: #489726)

[ Carlos Galisteo ]
* debian/control
  - Added Homepage field.

[ Ondrej Certik ]
* Checked the package on i386 and amd64, both with and without atlas, all
  tests run and the numpy package is faster if atlas is around. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="ascii"?>
 
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 
3
          "DTD/xhtml1-transitional.dtd">
 
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 
5
<head>
 
6
  <title>example</title>
 
7
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
 
8
  <script type="text/javascript" src="epydoc.js"></script>
 
9
</head>
 
10
 
 
11
<body bgcolor="white" text="black" link="blue" vlink="#204080"
 
12
      alink="#204080">
 
13
<!-- ==================== NAVIGATION BAR ==================== -->
 
14
<table class="navbar" border="0" width="100%" cellpadding="0"
 
15
       bgcolor="#a0c0ff" cellspacing="0">
 
16
  <tr valign="middle">
 
17
  <!-- Home link -->
 
18
      <th bgcolor="#70b0f0" class="navbar-select"
 
19
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
 
20
 
 
21
  <!-- Tree link -->
 
22
      <th>&nbsp;&nbsp;&nbsp;<a
 
23
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
 
24
 
 
25
  <!-- Index link -->
 
26
      <th>&nbsp;&nbsp;&nbsp;<a
 
27
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
 
28
 
 
29
  <!-- Help link -->
 
30
      <th>&nbsp;&nbsp;&nbsp;<a
 
31
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
 
32
 
 
33
      <th class="navbar" width="100%"></th>
 
34
  </tr>
 
35
</table>
 
36
<table width="100%" cellpadding="0" cellspacing="0">
 
37
  <tr valign="top">
 
38
    <td width="100%">
 
39
      <span class="breadcrumbs">
 
40
        Module&nbsp;example
 
41
      </span>
 
42
    </td>
 
43
    <td>
 
44
      <table cellpadding="0" cellspacing="0">
 
45
        <!-- hide/show private -->
 
46
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
 
47
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
 
48
        <tr><td align="right"><span class="options"
 
49
            >[<a href="frames.html" target="_top">frames</a
 
50
            >]&nbsp;|&nbsp;<a href="example-pysrc.html"
 
51
            target="_top">no&nbsp;frames</a>]</span></td></tr>
 
52
      </table>
 
53
    </td>
 
54
  </tr>
 
55
</table>
 
56
<h1 class="epydoc">Source Code for <a href="example-module.html">Module example</a></h1>
 
57
<pre class="py-src">
 
58
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-docstring">"""This is the docstring for the example.py module.  Modules names should</tt> </tt>
 
59
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-docstring">have short, all-lowercase names.  The module name may have underscores if</tt> </tt>
 
60
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"><tt class="py-docstring">this improves readability.</tt> </tt>
 
61
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
62
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-docstring">Every module should have a docstring at the very top of the file.  The</tt> </tt>
 
63
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-docstring">module's docstring may extend over multiple lines.  If your docstring does</tt> </tt>
 
64
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"><tt class="py-docstring">extend over multiple lines, the closing three quotation marks must be on</tt> </tt>
 
65
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-docstring">a line by itself, preferably preceeded by a blank line.</tt> </tt>
 
66
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
67
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-docstring">"""</tt> </tt>
 
68
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"><tt class="py-name">__docformat__</tt> <tt class="py-op">=</tt> <tt class="py-string">"restructuredtext en"</tt> </tt>
 
69
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"> </tt>
 
70
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt>                      <tt class="py-comment"># standard library imports first</tt> </tt>
 
71
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"> </tt>
 
72
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">numpy</tt> <tt class="py-keyword">as</tt> <tt class="py-name">np</tt>             <tt class="py-comment"># related third party imports next</tt> </tt>
 
73
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">scipy</tt> <tt class="py-keyword">as</tt> <tt class="py-name">sp</tt>             <tt class="py-comment"># imports should be at the top of the module</tt> </tt>
 
74
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">matplotlib</tt> <tt class="py-keyword">as</tt> <tt class="py-name">mpl</tt>       <tt class="py-comment"># imports should usually be on separate lines</tt> </tt>
 
75
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"> </tt>
 
76
<a name="foo"></a><div id="foo-def"><a name="L19"></a><tt class="py-lineno">19</tt> <a class="py-toggle" href="#" id="foo-toggle" onclick="return toggle('foo');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="example-module.html#foo">foo</a><tt class="py-op">(</tt><tt class="py-param">var1</tt><tt class="py-op">,</tt> <tt class="py-param">var2</tt><tt class="py-op">,</tt> <tt class="py-param">long_var_name</tt><tt class="py-op">=</tt><tt class="py-string">'hi'</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> </tt>
 
77
</div><div id="foo-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="foo-expanded"><a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line">    <tt class="py-docstring">"""One-line summary or signature.</tt> </tt>
 
78
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
79
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"><tt class="py-docstring">    Several sentences providing an extended description. You can put</tt> </tt>
 
80
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"><tt class="py-docstring">    text in mono-spaced type like so: ``var``.</tt> </tt>
 
81
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
82
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line"><tt class="py-docstring">    Parameters</tt> </tt>
 
83
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"><tt class="py-docstring">    ----------</tt> </tt>
 
84
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"><tt class="py-docstring">    var1 : array_like</tt> </tt>
 
85
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"><tt class="py-docstring">        Array_like means all those objects -- lists, nested lists, etc. --</tt> </tt>
 
86
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line"><tt class="py-docstring">        that can be converted to an array.</tt> </tt>
 
87
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line"><tt class="py-docstring">    var2 : integer</tt> </tt>
 
88
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"><tt class="py-docstring">        Write out the full type</tt> </tt>
 
89
<a name="L32"></a><tt class="py-lineno">32</tt>  <tt class="py-line"><tt class="py-docstring">    long_variable_name : {'hi', 'ho'}, optional</tt> </tt>
 
90
<a name="L33"></a><tt class="py-lineno">33</tt>  <tt class="py-line"><tt class="py-docstring">        Choices in brackets, default first when optional.</tt> </tt>
 
91
<a name="L34"></a><tt class="py-lineno">34</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
92
<a name="L35"></a><tt class="py-lineno">35</tt>  <tt class="py-line"><tt class="py-docstring">    Returns</tt> </tt>
 
93
<a name="L36"></a><tt class="py-lineno">36</tt>  <tt class="py-line"><tt class="py-docstring">    -------</tt> </tt>
 
94
<a name="L37"></a><tt class="py-lineno">37</tt>  <tt class="py-line"><tt class="py-docstring">    named : type</tt> </tt>
 
95
<a name="L38"></a><tt class="py-lineno">38</tt>  <tt class="py-line"><tt class="py-docstring">        Explanation</tt> </tt>
 
96
<a name="L39"></a><tt class="py-lineno">39</tt>  <tt class="py-line"><tt class="py-docstring">    list</tt> </tt>
 
97
<a name="L40"></a><tt class="py-lineno">40</tt>  <tt class="py-line"><tt class="py-docstring">        Explanation</tt> </tt>
 
98
<a name="L41"></a><tt class="py-lineno">41</tt>  <tt class="py-line"><tt class="py-docstring">    of</tt> </tt>
 
99
<a name="L42"></a><tt class="py-lineno">42</tt>  <tt class="py-line"><tt class="py-docstring">        Explanation</tt> </tt>
 
100
<a name="L43"></a><tt class="py-lineno">43</tt>  <tt class="py-line"><tt class="py-docstring">    outputs</tt> </tt>
 
101
<a name="L44"></a><tt class="py-lineno">44</tt>  <tt class="py-line"><tt class="py-docstring">        even more explaining</tt> </tt>
 
102
<a name="L45"></a><tt class="py-lineno">45</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
103
<a name="L46"></a><tt class="py-lineno">46</tt>  <tt class="py-line"><tt class="py-docstring">    Other Parameters</tt> </tt>
 
104
<a name="L47"></a><tt class="py-lineno">47</tt>  <tt class="py-line"><tt class="py-docstring">    ----------------</tt> </tt>
 
105
<a name="L48"></a><tt class="py-lineno">48</tt>  <tt class="py-line"><tt class="py-docstring">    only_seldom_used_keywords : type</tt> </tt>
 
106
<a name="L49"></a><tt class="py-lineno">49</tt>  <tt class="py-line"><tt class="py-docstring">        Explanation</tt> </tt>
 
107
<a name="L50"></a><tt class="py-lineno">50</tt>  <tt class="py-line"><tt class="py-docstring">    common_parametrs_listed_above : type</tt> </tt>
 
108
<a name="L51"></a><tt class="py-lineno">51</tt>  <tt class="py-line"><tt class="py-docstring">        Explanation</tt> </tt>
 
109
<a name="L52"></a><tt class="py-lineno">52</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
110
<a name="L53"></a><tt class="py-lineno">53</tt>  <tt class="py-line"><tt class="py-docstring">    See Also</tt> </tt>
 
111
<a name="L54"></a><tt class="py-lineno">54</tt>  <tt class="py-line"><tt class="py-docstring">    --------    </tt> </tt>
 
112
<a name="L55"></a><tt class="py-lineno">55</tt>  <tt class="py-line"><tt class="py-docstring">    otherfunc : relationship (optional)</tt> </tt>
 
113
<a name="L56"></a><tt class="py-lineno">56</tt>  <tt class="py-line"><tt class="py-docstring">    newfunc : relationship (optional)</tt> </tt>
 
114
<a name="L57"></a><tt class="py-lineno">57</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
115
<a name="L58"></a><tt class="py-lineno">58</tt>  <tt class="py-line"><tt class="py-docstring">    Notes</tt> </tt>
 
116
<a name="L59"></a><tt class="py-lineno">59</tt>  <tt class="py-line"><tt class="py-docstring">    -----</tt> </tt>
 
117
<a name="L60"></a><tt class="py-lineno">60</tt>  <tt class="py-line"><tt class="py-docstring">    Notes about the implementation algorithm (if needed).</tt> </tt>
 
118
<a name="L61"></a><tt class="py-lineno">61</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
119
<a name="L62"></a><tt class="py-lineno">62</tt>  <tt class="py-line"><tt class="py-docstring">    This can have multiple paragraphs as can all sections.</tt> </tt>
 
120
<a name="L63"></a><tt class="py-lineno">63</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
121
<a name="L64"></a><tt class="py-lineno">64</tt>  <tt class="py-line"><tt class="py-docstring">    Examples</tt> </tt>
 
122
<a name="L65"></a><tt class="py-lineno">65</tt>  <tt class="py-line"><tt class="py-docstring">    --------</tt> </tt>
 
123
<a name="L66"></a><tt class="py-lineno">66</tt>  <tt class="py-line"><tt class="py-docstring">    examples in doctest format</tt> </tt>
 
124
<a name="L67"></a><tt class="py-lineno">67</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
125
<a name="L68"></a><tt class="py-lineno">68</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; a=[1,2,3]</tt> </tt>
 
126
<a name="L69"></a><tt class="py-lineno">69</tt>  <tt class="py-line"><tt class="py-docstring">    &gt;&gt;&gt; [x + 3 for x in a]</tt> </tt>
 
127
<a name="L70"></a><tt class="py-lineno">70</tt>  <tt class="py-line"><tt class="py-docstring">    [4, 5, 6]</tt> </tt>
 
128
<a name="L71"></a><tt class="py-lineno">71</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
129
<a name="L72"></a><tt class="py-lineno">72</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
 
130
<a name="L73"></a><tt class="py-lineno">73</tt>  <tt class="py-line"> </tt>
 
131
<a name="L74"></a><tt class="py-lineno">74</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
 
132
</div><a name="L75"></a><tt class="py-lineno">75</tt>  <tt class="py-line"> </tt>
 
133
<a name="L76"></a><tt class="py-lineno">76</tt>  <tt class="py-line"> </tt>
 
134
<a name="newfunc"></a><div id="newfunc-def"><a name="L77"></a><tt class="py-lineno">77</tt> <a class="py-toggle" href="#" id="newfunc-toggle" onclick="return toggle('newfunc');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="example-module.html#newfunc">newfunc</a><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> </tt>
 
135
</div><div id="newfunc-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="newfunc-expanded"><a name="L78"></a><tt class="py-lineno">78</tt>  <tt class="py-line">    <tt class="py-docstring">"""Do nothing.</tt> </tt>
 
136
<a name="L79"></a><tt class="py-lineno">79</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
137
<a name="L80"></a><tt class="py-lineno">80</tt>  <tt class="py-line"><tt class="py-docstring">    I never saw a purple cow.</tt> </tt>
 
138
<a name="L81"></a><tt class="py-lineno">81</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
139
<a name="L82"></a><tt class="py-lineno">82</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
 
140
<a name="L83"></a><tt class="py-lineno">83</tt>  <tt class="py-line"> </tt>
 
141
<a name="L84"></a><tt class="py-lineno">84</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
 
142
</div><a name="L85"></a><tt class="py-lineno">85</tt>  <tt class="py-line"> </tt>
 
143
<a name="L86"></a><tt class="py-lineno">86</tt>  <tt class="py-line"> </tt>
 
144
<a name="otherfunc"></a><div id="otherfunc-def"><a name="L87"></a><tt class="py-lineno">87</tt> <a class="py-toggle" href="#" id="otherfunc-toggle" onclick="return toggle('otherfunc');">-</a><tt class="py-line"><tt class="py-keyword">def</tt> <a class="py-def-name" href="example-module.html#otherfunc">otherfunc</a><tt class="py-op">(</tt><tt class="py-op">)</tt> <tt class="py-op">:</tt> </tt>
 
145
</div><div id="otherfunc-collapsed" style="display:none;" pad="++" indent="++++"></div><div id="otherfunc-expanded"><a name="L88"></a><tt class="py-lineno">88</tt>  <tt class="py-line">    <tt class="py-docstring">"""Do nothing.</tt> </tt>
 
146
<a name="L89"></a><tt class="py-lineno">89</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
147
<a name="L90"></a><tt class="py-lineno">90</tt>  <tt class="py-line"><tt class="py-docstring">    I never hope to see one.</tt> </tt>
 
148
<a name="L91"></a><tt class="py-lineno">91</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
 
149
<a name="L92"></a><tt class="py-lineno">92</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
 
150
<a name="L93"></a><tt class="py-lineno">93</tt>  <tt class="py-line"> </tt>
 
151
<a name="L94"></a><tt class="py-lineno">94</tt>  <tt class="py-line">    <tt class="py-keyword">pass</tt> </tt>
 
152
</div><a name="L95"></a><tt class="py-lineno">95</tt>  <tt class="py-line"> </tt><script type="text/javascript">
 
153
<!--
 
154
expandto(location.href);
 
155
// -->
 
156
</script>
 
157
</pre>
 
158
<br />
 
159
<!-- ==================== NAVIGATION BAR ==================== -->
 
160
<table class="navbar" border="0" width="100%" cellpadding="0"
 
161
       bgcolor="#a0c0ff" cellspacing="0">
 
162
  <tr valign="middle">
 
163
  <!-- Home link -->
 
164
      <th bgcolor="#70b0f0" class="navbar-select"
 
165
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>
 
166
 
 
167
  <!-- Tree link -->
 
168
      <th>&nbsp;&nbsp;&nbsp;<a
 
169
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
 
170
 
 
171
  <!-- Index link -->
 
172
      <th>&nbsp;&nbsp;&nbsp;<a
 
173
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
 
174
 
 
175
  <!-- Help link -->
 
176
      <th>&nbsp;&nbsp;&nbsp;<a
 
177
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
 
178
 
 
179
      <th class="navbar" width="100%"></th>
 
180
  </tr>
 
181
</table>
 
182
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
 
183
  <tr>
 
184
    <td align="left" class="footer">
 
185
    Generated by Epydoc 3.0beta1 on Tue Jan 22 00:26:36 2008
 
186
    </td>
 
187
    <td align="right" class="footer">
 
188
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
 
189
        >http://epydoc.sourceforge.net</a>
 
190
    </td>
 
191
  </tr>
 
192
</table>
 
193
 
 
194
<script type="text/javascript">
 
195
  <!--
 
196
  // Private objects are initially displayed (because if
 
197
  // javascript is turned off then we want them to be
 
198
  // visible); but by default, we want to hide them.  So hide
 
199
  // them unless we have a cookie that says to show them.
 
200
  checkCookie();
 
201
  // -->
 
202
</script>
 
203
</body>
 
204
</html>