Skip to main content

Numerical analysis, simulation and data fitting in STEM

Project description

stemre

A Python library for numerical analysis, simulation and data fitting in Science, Technology, Engineering and Mathematics (STEM).

Installation

Use the package manager pip to install the Stemre library.

pip install stemre

Usage

The library is imported into a Python session by running the following import statement.

import stemre as stm

Examples

We will give a few examples that will demonstrate the use of the Stemre library. Before that, the following libraries need to be installed.

import numpy as np
import sympy as sym
import pandas as pd
import matplotlib.pyplot as plt

Differentiation of parametric equations

t = sym.symbols('t')
x = t ** 3 - 3 * t ** 2
y = t ** 4 - 8 * t ** 2
result = stm.par_diff(f = x, g = y, 
                      dependent_variable = t, n = 3)
stm.disp(x = x, y = y, dfdx = result)

Richardson extrapolation

pd.set_option('display.precision', 14)
f = lambda x: x ** 2 * np.exp(x)
x, n, h = 2.5, 5, 0.001
_, df, dx = stm.richardson(f, x, n, h)
stm.disp(Table = df, Result = dx)

Gauss-Legendre quadrature integration

f = lambda x: 13 * (x - x ** 2) * np.exp(-3 * x/2)
a, b, n = 0, 4, 15
result = stm.gauss_legendre(f, a, b, n)
stm.disp(Result = result)

Initial value problems

ode_function = 'y - t^2 + 1'
exact_solution = '(t+1)^2 - 1/2 * exp(t)'
table, figure = stm.ivps(ode_equations = [ode_function, exact_solution],
                         time_span = [0, 3],
                         initial_y = 0.5,
                         steps_stepsize = ['h', 0.12],
                         ivp_method = 'rk4', 
                         show_iterations = None, 
                         decimal_points = 12)
display(table, figure)

Support

For any support on any of the functions in this library, send us an email at: stemresearchs@gmail.com. We are willing to offer the necessary support where we possibly can.

Roadmap

Future releases aim to make Stemre a full-featured numerical analysis, simulation and data fitting library for learning in STEM (Science, Technology, Engineering and Mathematics).

Contributing

To make Stemre a successful library while keeping the code easy. We welcome any valuable contributions towards the development and improvement of this library.

For major changes to the library, please open an issue with us first to discuss what you would like to change and we will be more than willing to make the changes.

Authors and acknowledgement

We are grateful to the incredible support from our developers at Stem Research.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stemre-0.0.17.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stemre-0.0.17-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file stemre-0.0.17.tar.gz.

File metadata

  • Download URL: stemre-0.0.17.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for stemre-0.0.17.tar.gz
Algorithm Hash digest
SHA256 e51b906d0d5b7a40a83c83c4573fd82434f832ec28027a772e8400e263bcf4b1
MD5 4338a30eb60c94374ebb3cfd8eee7b3b
BLAKE2b-256 22753ab527bc7fe6ace7785d9865cc9fdb0ca045869bb173b340a42af5edfb4c

See more details on using hashes here.

File details

Details for the file stemre-0.0.17-py3-none-any.whl.

File metadata

  • Download URL: stemre-0.0.17-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

File hashes

Hashes for stemre-0.0.17-py3-none-any.whl
Algorithm Hash digest
SHA256 41f790ba4d27f75d3b2cc63bc55d62fa07c4cbbeb6d60f6c7093c792066b5657
MD5 94a858ce6409b329b056181c4b402bdd
BLAKE2b-256 befdabfa199ce38743ea479ebd07806276ded092a1c8e104c6b616036342eee5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page