Tools for numerical math calculations
This repository contains tools for math numerical computation such as numerical integration and interpolation. The current implementation contains:
-
numerical integration using Gauss formula
import numpy as np from numerical.integration import gauss def f(x): return np.power(x[0], 2) gauss.integrate(f, 0., 1.) # 0.3333333
-
spline functions and theirs derivatives
import numpy as np from numerical import splines import matplotlib.pyplot as plt x = np.arange(0, 4., 0.05) y = splines.schoenberg(x) yd1 = splines.schoenberg.deriv(x, order=1) # first derivative yd2 = splines.schoenberg.deriv(x, order=2) # second derivative # visualize results plt.plot(x, y) plt.plot(x, yd1) plt.plot(x, yd2) plt.show()
-
function interpolation
import numpy as np from numerical import interpolate import matplotlib.pyplot as plt def fun(x): return 1 - np.power(x[0] - 0.5, 2) grid = np.array([np.arange(0, 1.0001, 0.25)]) values = fun(grid) itp_fun = interpolate(values, grid) x = np.arange(0., 1.00001, 0.001).reshape(1, -1) y_intp = itp_fun(x) y_true = fun(x) plt.plot(x[0], y_intp) plt.plot(x[0], y_true) plt.show()
Metadata
Release files for scikit-numerical 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| scikit-numerical-0.1.1.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| scikit_numerical-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.5 kB
Release files / scikit-numerical-0.1.1.tar.gz
| Download URL | scikit-numerical-0.1.1.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9214196312c0aeb421cc179dabee607be9cb24ad957b44aa3d3f4666c108a1de
|
|
BLAKE2b-256 checksum How to use checksums |
6a59daa680ddf616948d59789b399f289f89132f872809ce932d203fc26bd999
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
|
Release files / scikit_numerical-0.1.1-py3-none-any.whl
| Download URL | scikit_numerical-0.1.1-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b227a49eceba10513cc9bc4499e2f07b56a0b520a61a82d850139581f0986498
|
|
BLAKE2b-256 checksum How to use checksums |
7e57943feeefc799550e2f6de7c9afa7ec562595f725bab2a4a771201fcf34fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
|