-
Notifications
You must be signed in to change notification settings - Fork 5
/
natu.numpy.html
192 lines (181 loc) · 10.9 KB
/
natu.numpy.html
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>natu.numpy — Natural units in Python</title>
<link rel="stylesheet" href="javascripts/custom.css" type="text/css" />
<link rel="stylesheet" href="javascripts/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.1.1',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="javascripts/jquery.js"></script>
<script type="text/javascript" src="javascripts/underscore.js"></script>
<script type="text/javascript" src="javascripts/doctools.js"></script>
<script type="text/javascript" src="javascripts/copybutton.js"></script>
<script type="text/javascript" src="javascripts/analytics.js"></script>
<link rel="search" type="application/opensearchdescription+xml"
title="Search within Natural units in Python"
href="javascripts/opensearch.xml"/>
<link rel="shortcut icon" href="javascripts/favicon.ico"/>
<link rel="top" title="Natural units in Python" href="index.html" />
<link rel="next" title="natu.units" href="natu.units.html" />
<link rel="prev" title="natu.math" href="natu.math.html" />
<meta name="description" content="Python module for natural units">
<meta name="keywords" content="Python, units, quantities, quantity, calculus, natural, unit, conversion, SI, physics, dimension">
<meta name="author" content="Kevin Davies">
<link rel="icon" type="image/png" href="javascripts/favicon-196x196.png" sizes="196x196">
<link rel="icon" type="image/png" href="javascripts/favicon-160x160.png" sizes="160x160">
<link rel="icon" type="image/png" href="javascripts/favicon-96x96.png" sizes="96x96">
<link rel="icon" type="image/png" href="javascripts/favicon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="javascripts/favicon-32x32.png" sizes="32x32">
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="natu.units.html" title="natu.units"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="natu.math.html" title="natu.math"
accesskey="P">previous</a> |</li>
<li><a href="index.html">natu v0.1.1 documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-natu.numpy">
<span id="natu-numpy"></span><h1><a class="reference internal" href="#module-natu.numpy" title="natu.numpy"><tt class="xref py py-mod docutils literal"><span class="pre">natu.numpy</span></tt></a><a class="headerlink" href="#module-natu.numpy" title="Permalink to this headline">¶</a></h1>
<p><a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.9)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a>, adapted for use with physical quantities</p>
<p>Many of the functions only accept dimensionless quantities, and they operate on
the underlying values—not the values as represented in a particular display
unit. To operate on values in a display unit would be to favor a particular
unit, which is against the <a class="reference external" href="index.html">design of the package</a>.</p>
<p>The constants (<em>pi</em>, <em>e</em>) are exactly as they are in <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.9)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a>.</p>
<p>These functions accept floats, integers, and dimensionless quantities:</p>
<ul class="simple">
<li>Hyperbolic functions: <tt class="xref py py-func docutils literal"><span class="pre">arccosh()</span></tt>, <tt class="xref py py-func docutils literal"><span class="pre">arcsinh()</span></tt>, <tt class="xref py py-func docutils literal"><span class="pre">arctanh()</span></tt>,
<tt class="xref py py-func docutils literal"><span class="pre">cosh()</span></tt>, <tt class="xref py py-func docutils literal"><span class="pre">sinh()</span></tt>, and <tt class="xref py py-func docutils literal"><span class="pre">tanh()</span></tt></li>
</ul>
<p>They functions are the same as those from <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.9)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a>. The functions cast
quantities cast as floats and return floats.</p>
<p>These functions accept angle as a quantity:</p>
<ul class="simple">
<li><tt class="xref py py-func docutils literal"><span class="pre">cos()</span></tt>, <tt class="xref py py-func docutils literal"><span class="pre">sin()</span></tt>, and <tt class="xref py py-func docutils literal"><span class="pre">tan()</span></tt></li>
</ul>
<p>These functions accept floats, integers, and dimensionless quantities:</p>
<ul class="simple">
<li><tt class="xref py py-func docutils literal"><span class="pre">acos()</span></tt>, <tt class="xref py py-func docutils literal"><span class="pre">asin()</span></tt>, <tt class="xref py py-func docutils literal"><span class="pre">atan()</span></tt>, and <tt class="xref py py-func docutils literal"><span class="pre">atan2()</span></tt></li>
</ul>
<p>They return angles as quantities.</p>
<p>These functions are no longer applicable and have been deleted since angle is a
quantity:</p>
<ul class="simple">
<li><tt class="xref py py-func docutils literal"><span class="pre">degrees()</span></tt>, <tt class="xref py py-func docutils literal"><span class="pre">radians()</span></tt>, <tt class="xref py py-func docutils literal"><span class="pre">rad2deg()</span></tt>, and <tt class="xref py py-func docutils literal"><span class="pre">deg2rad()</span></tt></li>
</ul>
<p>All other functions are directly imported from <a class="reference external" href="http://docs.scipy.org/doc/numpy/reference/index.html#module-numpy" title="(in NumPy v1.9)"><tt class="xref py py-mod docutils literal"><span class="pre">numpy</span></tt></a>. However, some of
these need to be adapted (<a class="reference external" href="https://github.com/kdavies4/natu/issues/7">Issue #7</a>).</p>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<p class="logo"><a href="index.html">
<img class="logo" src="javascripts/logo.svg" alt="Logo"/>
</a></p><h3><a href="index.html">Project Info</a></h3>
<ul>
<li><a href="install.html">Installation</a></li>
<li><a href="http://nbviewer.ipython.org/github/kdavies4/natu/blob/master/examples/tutorial.ipynb">Tutorial</a></li>
<li><a href="credits.html">Credits</a></li>
<li><a href="license.html">License</a></li>
<li><a href="changes.html">Change log</a></li>
</ul><h3><a href="definitions.html">Definition Files</a></h3>
<ul>
<li><a href="base-ini.html">Base constants</a></li>
<li><a href="derived-ini.html">Derived constants</a></li>
<li><a href="BIPM-ini.html">BIPM units</a></li>
<li><a href="other-ini.html">Other units</a></li>
</ul>
<h3><a href="usermodules.html">User Modules</a></h3>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="natu.config.html"><tt class="docutils literal"><span class="pre">natu.config</span></tt></a></li>
<li class="toctree-l1"><a class="reference internal" href="natu.groups.html"><tt class="docutils literal"><span class="pre">natu.groups</span></tt></a></li>
<li class="toctree-l1"><a class="reference internal" href="natu.math.html"><tt class="docutils literal"><span class="pre">natu.math</span></tt></a></li>
<li class="toctree-l1 current"><a class="current reference internal" href=""><tt class="docutils literal"><span class="pre">natu.numpy</span></tt></a></li>
<li class="toctree-l1"><a class="reference internal" href="natu.units.html"><tt class="docutils literal"><span class="pre">natu.units</span></tt></a></li>
</ul>
<h3><a href="api.html">API</a></h3>
<ul>
<!--
<li><a href="natu.core.html"><tt class="docutils literal"><span class="pre">natu.core</span></tt></a></li>
<li><a href="natu.exponents.html"><tt class="docutils literal"><span class="pre">natu.exponents</span></tt></a></li>
<li><a href="natu.util.html"><tt class="docutils literal"><span class="pre">natu.util</span></tt></a></li>
-->
</ul><h3>Useful Links</h3>
<ul>
<li><a href="https://pypi.python.org/pypi/natu">natu @ PyPI</a></li>
<li><a href="https://github.com/kdavies4/natu">Code in GitHub</a></li>
<li><a href="https://github.com/kdavies4/natu/issues">Issue tracker</a></li>
<li><a href="seealso.html">See also</a></li>
</ul>
<div id="searchbox" style="display: none" role="search">
<h3><a href="search.html">Search</a></h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script><h3>Download</h3>
<ul>
<li><a itemprop="downloadUrl"
href="https://pypi.python.org/packages/source/n/natu/natu-0.1.1.tar.gz"
rel="nofollow">Latest version<br>(v0.1.1, 2015-04-08)</a></li>
</ul>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="natu.units.html" title="natu.units"
>next</a> |</li>
<li class="right" >
<a href="natu.math.html" title="natu.math"
>previous</a> |</li>
<li><a href="index.html">natu v0.1.1 documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2013-2014, Kevin Davies, Hawaii Natural Energy Institute and Georgia Tech Research Corporation.
Last updated on Apr 08, 2015.
</div>
</body>
</html>