File: Scientific_30.html

package info (click to toggle)
python-scientific 2.4.11-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,956 kB
  • ctags: 3,063
  • sloc: python: 9,157; ansic: 4,483; xml: 4,145; makefile: 126; sh: 18; csh: 1
file content (47 lines) | stat: -rw-r--r-- 1,629 bytes parent folder | download | duplicates (3)
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
<a name="Module:Scientific.Statistics.Histogram"><h1>Module Scientific.Statistics.Histogram</h1></a>

<hr width=70%>
<a name="Class:Scientific.Statistics.Histogram.Histogram"><h2>Class Histogram: Histogram in one variable</h2></a>

<p>Constructor: Histogram(<i>data</i>, <i>bins</i>, <i>range</i>=None)</p>

<p><dl>
<dt><i>data</i></dt>
<dd><p>
a sequence of data points</p></dd>
<dt><i>bins</i></dt>
<dd><p>
the number of bins into which the data is to be sorted</p></dd>
<dt><i>range</i></dt>
<dd><p>
a tuple of two values, specifying the lower and
           the upper end of the interval spanned by the bins.
           Any data point outside this interval will be ignored.
           If no range is given, the smallest and largest
           data values are used to define the interval.</p></dd>
</dl>
</p>

<p>The bin index and the number of points in a bin can be obtained by
indexing the histogram with the bin number. Application of len()
yields the number of bins. A histogram thus behaves like a
sequence of bin index - bin count pairs.
</p>

<b>Methods:</b><br>
<ul>
<li> <b><i>addData</i></b>(<i>data</i>)
<p>Add the values in <i>data</i> (a sequence of numbers) to the
originally supplied data. Note that this does not affect the
default range of the histogram, which is fixed when the
histogram is created.
</p>

<li> <b><i>normalize</i></b>(<i>norm</i>=<tt>1.0</tt>)
<p>Scales all counts by the same factor such that their sum is <i>norm</i>.</p>

<li> <b><i>normalizeArea</i></b>(<i>norm</i>=<tt>1.0</tt>)
<p>Scales all counts by the same factor such that the area under
the histogram is <i>norm</i>.</p>

</ul>