File: utils.py.html

package info (click to toggle)
python-gnuplot 1.5-3
  • links: PTS
  • area: main
  • in suites: woody
  • size: 764 kB
  • ctags: 554
  • sloc: python: 1,314; makefile: 45; sh: 22
file content (169 lines) | stat: -rw-r--r-- 4,581 bytes parent folder | download
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
<html>

        <head>
        <title>Module: utils</title>
        </head>

        <body bgcolor="#ffffff">

        <p><i><a href="../index.html">Table of Contents</a></i></p>
        
        <table border="0" cellpadding="5" cellspacing="0" width="100%">
        <tr bgcolor="#88bbee">
            <th rowspan="2"
                valign="top"
                align="left"
                width="10%"><font color="#000000">Module: utils</font>
            </th>
            <th align="right"><font color="#000000">Gnuplot/utils.py</font></th>
        </tr>
        <tr>
        <td>
        <dl><dt>utils.py</dt><dd><p>Utility functions used by Gnuplot.</p>

</dd></dl>
<p>This module contains utility functions used by Gnuplot.py which aren't
particularly gnuplot-related.</p>
<p>
<TABLE BORDER=1 CELLPADDING=2>
</TABLE></p>


        
        <table border="0" cellpadding="5" cellspacing="0" width="100%%">
        
        <tr>
            <th bgcolor="#99ccff"
                rowspan="2"
                valign="top"
                align="left"
                width="20%"
                >
                <font color="#000000">
                  <a name="Functions">Functions</a>&nbsp;
                </font>
            </th>
            <th bgcolor="#99ccff"
                valign="top"
                align="left"
                >
                <font color="#000000">&nbsp;</font>
            </th>
        </tr>
        <tr>
        <td>
        
<a href="#float_array">float_array</a><br>
<a href="#write_array">write_array</a><br>


        <tr>
            <th bgcolor="#99ccff"
                rowspan="2"
                valign="top"
                align="left"
                width="20%"
                >
                <font color="#000000">
                  <a name="float_array"></a>&nbsp;
                </font>
            </th>
            <th bgcolor="#99ccff"
                valign="top"
                align="left"
                >
                <font color="#000000">float_array&nbsp;</font>
            </th>
        </tr>
        <tr>
        <td>
        <pre>
float_array ( m )

</pre><dl><dt><p><strong>Return the argument as a Numeric array of type at least <code>Float32</code>.</strong><p>
</dt><dd><p>    Leave <code>Float64</code> unchanged, but upcast all other types to
    <code>Float32</code>.  Allow also for the possibility that the argument is a
    python native type that can be converted to a Numeric array using
    <code>Numeric.asarray()</code>, but in that case don't worry about
    downcasting to single-precision float.</p>


</dd></dl>

        <tr>
            <th bgcolor="#99ccff"
                rowspan="2"
                valign="top"
                align="left"
                width="20%"
                >
                <font color="#000000">
                  <a name="write_array"></a>&nbsp;
                </font>
            </th>
            <th bgcolor="#99ccff"
                valign="top"
                align="left"
                >
                <font color="#000000">write_array&nbsp;</font>
            </th>
        </tr>
        <tr>
        <td>
        <pre>
write_array (
        f,
        set,
        item_sep=' ',
        nest_prefix='',
        nest_suffix='\n',
        nest_sep='',
        )

</pre><p>Write an array of arbitrary dimension to a file.</p>

<p>    A general recursive array writer.  The last four parameters allow
    a great deal of freedom in choosing the output format of the
    array.  The defaults for those parameters give output that is
    gnuplot-readable.  But using <code>(",", "{", "}", ",
")</code> would output
    an array in a format that Mathematica could read.  <code>item_sep</code>
    should not contain <code>%</code> (or if it does, it should be escaped to
    <code>%%</code>) since it is put into a format string.</p>
<p>    The default 2-d file organization:</p>
<PRE>
        set[0,0] set[0,1] ...
        set[1,0] set[1,1] ...

</PRE>

<p>    The 3-d format:</p>
<PRE>
        set[0,0,0] set[0,0,1] ...
        set[0,1,0] set[0,1,1] ...

        set[1,0,0] set[1,0,1] ...
        set[1,1,0] set[1,1,1] ...

</PRE>


</td></tr>
        </td>
        </tr>
        </table>
        
        </td>
        </tr>
        </table>

        <hr>

        <p><i><a href="../index.html">Table of Contents</a></i></p>

        <i>This document was automatically generated on Fri Jan 26 14:06:11 2001
        by <a href="http://happydoc.sourceforge.net">HappyDoc</a> version r0_9_2</i>

        </body>
        </html>