Collection of tools for programmation and modeling X
Project description
PMXUtils
Tools for ProgModX
Note that the package is in development and may undergo frequent updates
Install with python -m pip install pmxutils for windows and python3 -m pip install pmxutils for unix/linux
Table of content
Mathtools (pmxutils.mathtools)
-
construct(expression, var=x)Returns a function computing the given expression
expression- The mathematical expression to compute, type = stringvar- The variable used in the mathematical expression, defaults tp 'x', type = string
-
`advConstruct(expression, *args, constants = {})
Returns a function computing the given expression
expression- The mathematical expression to compute, type = stringargs- Any number of individual arguments naming the variables used in the expresion, type = stringconstants- A dictionary with any numerical constants in the expression, type = dict
-
computeLists(function, low, high, step=1)Returns a touple of two lists containing x values inbetween low and high, and the computed results for y. In the format of (x_list, y_list)
low- The lower end of the function limit, type = numberhigh- The upper end of the function limit, type = numberfunction- The mathematical expression to use for y value computation, type = string or function from constructstep- The step size in the x value list, defaults to '1', type = number
-
newton(function, derivative, low, high, tolerance=1e-8, rounding = 3, iterations = 1000)Uses Newtons way of finding the root of a function, using the function and its derivative, within the given limits.Returns None if it can't find a solution that satisfies the tolerance after the defined number of terations
function- The target mathematical expression, type = string or function from constructderivative- The derivative of the target mathematical expression, type = string or function from constructlow- The lower end of the are which should be checked for roots, type = numberhigh- The upper end of the are which should be checked for roots, type = numbertolerance- The tolerance for error to speed up computation, defaults to '1e-8', type = numberrounding- Rounds the x value for the root to the specified amount of decimals, defaults to '3', type = numberiterations- The number of tries, after which the function will end early
-
isInbetween(number, low, high)Returns True if number is inbetween limOne and limTwo, returns False otherwise
number- The number to be checked, type = numberlow- The lower limit for which the number is checked, type = numberhigh- The upper limit for which the number is checked, type = number
-
rectangleIntegral(function, low, high, n)Returns the numerically calculated integral of the function f inbetween a and b using n rectangles
function- The function to integrate, type = string or function from constructlow- The low end of the area to be computed, type = numberhigh- The high end of the area to be computed, type = numbern- The number of rectangles to use, type = int
-
trapezoidIntegral(function, low, high, n)Returns the numerically calculated integral of the function f inbetween a and b using n trapezoids
function- The function to integrate, type = string or function from constructlow- The low end of the area to be computed, type = numberhigh- The high end of the area to be computed, type = numbern- The number of trapezoids to use, type = int
-
simpsonIntegral(function, low, high, n)Returns the numerically calculated integral of the function inbetween low and high using n quadratic splines
function- The function to integrate, type = string or function from constructlow- The low end of the area to be computed, type = numberhigh- The high end of the area to be computed, type = numbern- The number of quadratic splines to use, type = int
-
euler(functionDerivative, low, high, y0, n)Returns a numpy array x, containing the x values of the function, and an array F, containing the computed values for the antiderivative function of the given function functionDerivative inbetween low and high with N steps
Only supports functions with one variable
functionDerivative- The derivative of the goal function, type = string or function from constructlow- The low end of the function to be computed, type = numberhigh- The high end of the area to be computed, type = numbery0- The initial value of the goal functionn- The number of computations to perform
-
lemma(a, b)Returns the greatest common denominator of a and b using the lemma algorithm
a- The first numberb- The second number
Other (pmxutils.other)
-
profile(function)Time profiler. Prints out the elapsed time during function execution
function- The function to profile, type = function
loading()
Loading class
-
start(flavor="loading")Starts a loading sequence
flavor- The message to be displayed during loading, defaults to 'loading', type = string
-
stop()Stops the loading sequence
-
animate()DO NOT USE, internal function
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pmxutils-0.1.0.tar.gz.
File metadata
- Download URL: pmxutils-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a6636a57eca99a9991489d00c0bcc71229e17ea6c9d0fb956c7927cf5413363c
|
|
| MD5 |
3cc50cf5c44a9dc3b0c9a2bf4470de86
|
|
| BLAKE2b-256 |
d7c9fe27840a6d77ff90e28cf19c1b773db107cc179609dad75a27cb8899a7be
|
File details
Details for the file pmxutils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pmxutils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2030bfbd03b629ded64d8f3733225915702b5e28bdcdb7cf5839d822706eeda2
|
|
| MD5 |
58fdd1ddaf920e802447511f17056141
|
|
| BLAKE2b-256 |
da282d0be0d6ef5974a0246b4b70d11bfc49f382ece408a6c5e685e12165c1a5
|