Skip to content

Commit 4b78b13

Browse files
DOC: Add docweb to hold top-level HTML web page.
1 parent f22b310 commit 4b78b13

File tree

5 files changed

+247
-0
lines changed

5 files changed

+247
-0
lines changed

docweb/README.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This directory contains the files for the top-level online documentation.
2+
If these files are changed, the changes must be copied over to the top directory
3+
of the gh-pages branch.

docweb/css/home.css

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
2+
body {
3+
margin: auto;
4+
padding-right: 1em;
5+
padding-left: 1em;
6+
max-width: 48em;
7+
color: black;
8+
font-family: sans-serif;
9+
font-size: 100%;
10+
line-height: 125%;
11+
color: #333;
12+
}
13+
pre {
14+
border: 1px dotted gray;
15+
background-color: #E8E8E8;
16+
color: #101010;
17+
padding: 0.5em;
18+
}
19+
code {
20+
font-family: monospace;
21+
font-size: 130%;
22+
font-weight: bold;
23+
}
24+
h1 a, h2 a, h3 a, h4 a, h5 a {
25+
text-decoration: none;
26+
color: #336699;
27+
}
28+
h1, h2, h3, h4, h5 {
29+
font-family: sans-serif;
30+
font-weight: bold;
31+
color: #336699; }
32+
33+
h1 {
34+
font-size: 130%;
35+
}
36+
37+
h2 {
38+
font-size: 110%;
39+
font-style: italic;
40+
}
41+
42+
h3 {
43+
font-size: 95%;
44+
font-style: italic;
45+
}
46+
47+
h4 {
48+
font-size: 90%;
49+
font-style: italic;
50+
}
51+
52+
h5 {
53+
font-size: 90%;
54+
font-style: italic;
55+
}
56+
57+
h1.title {
58+
font-size: 200%;
59+
font-weight: bold;
60+
padding-top: 0.2em;
61+
padding-bottom: 0.2em;
62+
text-align: left;
63+
border: none;
64+
}
65+
66+
dt code {
67+
font-weight: bold;
68+
}
69+
dd p {
70+
margin-top: 0;
71+
}
72+
73+
ul {
74+
padding: 0px 0px 0px 16px;
75+
}
76+
77+
ul li {
78+
margin: 0px;
79+
padding: 0px;
80+
}
81+
82+
.link2 {
83+
border: solid 1px #000;
84+
border-radius: 3x;
85+
-moz-border-radius: 3px;
86+
-webkit-border-radius: 3px;
87+
background-color: #FFF;
88+
color: #336699;
89+
text-decoration: none;
90+
text-align: center;
91+
width: 180px;
92+
margin: 0px 0px 2px 0px;
93+
padding: 2px 0 0px 0px;
94+
display: inline-block;
95+
}
96+
.link2:hover { background-color: #FFF060; }
97+
98+
aside h3 {
99+
margin: 10px 0px 2px 0px;
100+
}
101+
102+
/*
103+
* Specific id styles.
104+
*/
105+
106+
#logo {
107+
border: solid 1px #000;
108+
padding: 5px 5px 3px 5px;
109+
background-color: #FFFFEA;
110+
}
111+
112+
#asidelinks {
113+
width: 25%;
114+
float: right;
115+
color: black;
116+
background-color: #E8F4FF;
117+
padding: 0px 10px 10px 10px;
118+
border: solid 1px #000;
119+
margin: 0em 0.75em 0em 0.5em;
120+
box-shadow: 5px 8px 9px #b0b0b0;
121+
}
122+
123+
#footer {
124+
padding-top: 1em;
125+
font-size: 70%;
126+
color: gray;
127+
text-align: center;
128+
}
170 Bytes
Loading
Lines changed: 11 additions & 0 deletions
Loading

docweb/index.html

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
<!DOCTYPE html>
2+
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
6+
<title>numpy-financial</title>
7+
<style type="text/css">
8+
code{white-space: pre-wrap;}
9+
span.smallcaps{font-variant: small-caps;}
10+
span.underline{text-decoration: underline;}
11+
div.column{display: inline-block; vertical-align: top; width: 50%;}
12+
</style>
13+
<link rel="stylesheet" href="css/home.css" />
14+
<!--[if lt IE 9]>
15+
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
16+
<![endif]-->
17+
<title>
18+
numpy-financial
19+
</title>
20+
<link rel="icon" type="image/png" href="images/numpy_financial_favicon.png" />
21+
</head>
22+
<body>
23+
<h1 id="logo"><img src="images/numpy_financial_logoh.svg" title="numpy-financial logo" alt="logo" /></h1>
24+
<aside id="asidelinks">
25+
<h3>Reference Documentation</h3>
26+
<a href="https://numpy/numpy_financial/latest/" class="link2">Latest release</a>
27+
<a href="https://numpy/numpy_financial/dev/" class="link2">Development version</a>
28+
<h3>Source Code on GitHub</h3>
29+
<a href="https://github.com/numpy/numpy-financial" class="link2">numpy-financial</a>
30+
</aside>
31+
<p>
32+
The numpy-financial Python package is a collection of elementary
33+
financial functions. These functions were copied to this package
34+
from version 1.17 of NumPy.
35+
</p>
36+
<p>The <a href="https://numpy.org/doc/1.17/reference/routines.financial.html">financial functions in NumPy</a>
37+
are deprecated and eventually will be removed from NumPy; see
38+
<a href="https://numpy.org/neps/nep-0032-remove-financial-functions.html">NEP-32</a>
39+
for more information. This package is the replacement for the deprecated
40+
NumPy financial functions.
41+
</p>
42+
43+
<h2 id="installation">Installation</h2>
44+
<p>
45+
The package is available on <a href="https://pypi.org/project/numpy-financial">PyPI</a>, and may be installed
46+
with <code>pip</code>:
47+
48+
<pre>
49+
$ pip install numpy-financial
50+
</pre>
51+
52+
The package requires NumPy version 1.17 or later.
53+
</p>
54+
55+
<h2 id="using">Using <code>numpy_financial</code></h2>
56+
<p>
57+
The importable name of the package is <code>numpy_financial</code>.
58+
The recommended alias is <code>npf</code>. For example,
59+
</p>
60+
<pre>
61+
>>> import numpy_financial as npf
62+
>>> npf.irr([-250000, 100000, 150000, 200000, 250000, 300000])
63+
0.5672303344358536
64+
</pre>
65+
66+
<h2 id="replacing">Switching from <code>numpy</code> to <code>numpy_financial</code></h2>
67+
<ul>
68+
<li>
69+
<p>Code that imports the function names like this
70+
<pre>
71+
from numpy import npv, irr
72+
</pre>
73+
requires only that the import be changed to
74+
<pre>
75+
from numpy_financial import npv, irr
76+
</pre>
77+
</p>
78+
</li>
79+
<li>
80+
<p>For code that uses the <code>numpy</code> namespace like this
81+
<pre>
82+
import numpy as np
83+
84+
x = np.array([-250000, 100000, 150000, 200000, 250000, 300000])
85+
r = np.irr(x)
86+
</pre>
87+
the import statement for the numpy-financial package must be added,
88+
and the calls of the financial functions must be changed to use
89+
the <code>npf</code> namespace:
90+
<pre>
91+
import numpy as np
92+
import numpy_financial as npf
93+
94+
x = np.array([-250000, 100000, 150000, 200000, 250000, 300000])
95+
r = npf.irr(x)
96+
</pre>
97+
</p>
98+
</li>
99+
</ul>
100+
101+
<div id="footer">
102+
&copy; 2019 NumPy-Financial Developers</a>
103+
</div>
104+
</body>
105+
</html>

0 commit comments

Comments
 (0)