Skip to main content

timevar-poly: A lightweight engine for time-variant polynomials.

Project description

timevar-poly

A lightweight Python engine for time-variant polynomials.

Features

  • Coefficients can be constants or functions of time (TimeFunction).
  • Automatic constant reduction (optimizes 0, 1, and constant operations).
  • Symbolic-numeric differentiation (spatial diff_x() and temporal diff_t()).
  • No external dependencies.

Quick Start

from timevar_poly import TimeVariantPolynomial, TimeFunction
import math

# P(x, t) = (sin t)x + 5
P = TimeVariantPolynomial({1: TimeFunction(math.sin), 0: 5})
print(P(x=2, t=math.pi/2)) # Output: 7.0

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

timevar_poly-0.1.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

timevar_poly-0.1.2-py2.py3-none-any.whl (4.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file timevar_poly-0.1.2.tar.gz.

File metadata

  • Download URL: timevar_poly-0.1.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for timevar_poly-0.1.2.tar.gz
Algorithm Hash digest
SHA256 adc6203297e82c4927e10e58124bb3380ace449894e51d01262fbf31ad24b550
MD5 3f8d825099295a5546e5485e667572b4
BLAKE2b-256 1820c506038160d126ccc4a589305899ef7e32d50810b4dca1724f08e0d6e791

See more details on using hashes here.

File details

Details for the file timevar_poly-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for timevar_poly-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 464e0d0f498db67203e1088d5e2f821eafc95cceacb337a06da165d9e566e312
MD5 54522f2938a67ea989ae69d0a25f1916
BLAKE2b-256 130cdc4aa7d93b7b3da3472f4bd81a0957154afcf1c55adf7b79a1c89eb419b7

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