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.1.tar.gz (3.6 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.1-py2.py3-none-any.whl (4.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for timevar_poly-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5918ba09d57177b15fa55368a35831597a716b8d698295d09a5877c6674d7744
MD5 e5624dc2ab5519780ff36392d211312a
BLAKE2b-256 2b588cccfb8ab2b7c54a2c2bc57dfa1ac9e0e1b3276fdd14c684d52ad4bb27e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for timevar_poly-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 47555a23beeec309a4c3ca2ce4363cfab552e2cca48dbfc9cc33d0e24dcc94e1
MD5 64b24134a9306bcadf507a15080b386a
BLAKE2b-256 10d4785cb3f41c1b170022a8fa057b87bf6b36eb2075e2c65661a57bbc6c9122

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