Skip to main content

A library for working with Multivariate Taylor Functions.

Project description

mtflib: Multivariate Taylor Function Library

Documentation Status License: MIT

A Python library for creating, manipulating, and composing Multivariate Taylor Functions, with a C++ backend for performance-critical applications.

Installation

The recommended way to install mtflib is from PyPI:

pip install mtflib

Installation from Source

Alternatively, you can install mtflib directly from the source repository using pip. Ensure you have a C++17 compliant compiler (e.g., GCC, Clang, MSVC) for building the backend extensions.

pip install .

Quick Start

Here's a simple example to get you started with mtflib:

import numpy as np
from mtflib import MultivariateTaylorFunction, Var, sin_taylor

# 1. Initialize global settings (must be done once)
# This sets the max order of the Taylor series and the number of variables.
MultivariateTaylorFunction.initialize_mtf(max_order=5, max_dimension=2)

# 2. Define symbolic variables
# Var(1) corresponds to x, Var(2) to y
x = Var(1)
y = Var(2)

# 3. Create a Taylor series expression
# This creates a Taylor series for sin(x) + y^2
f = sin_taylor(x) + y**2

# 4. Evaluate the result at a point
# Let's evaluate f at (x=0.5, y=2.0)
eval_point = np.array([0.5, 2.0])
result = f.eval(eval_point)

print(f"f(x, y) = sin(x) + y^2")
print(f"Result of f(0.5, 2.0): {result[0]}")

# For comparison, the exact value is sin(0.5) + 2.0^2
exact_value = np.sin(0.5) + 4.0
print(f"Exact value: {exact_value}")

# You can also view the Taylor series coefficients
print("\\nTaylor Series Representation:")
print(f)

Running Tests

The project uses pytest for testing. First, install the test dependencies:

pip install -e .[test]

Then, run the test suite from the root of the repository:

pytest

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

mtflib-1.4.3-cp312-cp312-win_amd64.whl (234.6 kB view details)

Uploaded CPython 3.12Windows x86-64

mtflib-1.4.3-cp312-cp312-musllinux_1_2_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

mtflib-1.4.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

mtflib-1.4.3-cp311-cp311-win_amd64.whl (232.0 kB view details)

Uploaded CPython 3.11Windows x86-64

mtflib-1.4.3-cp311-cp311-musllinux_1_2_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

mtflib-1.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

mtflib-1.4.3-cp310-cp310-win_amd64.whl (230.2 kB view details)

Uploaded CPython 3.10Windows x86-64

mtflib-1.4.3-cp310-cp310-musllinux_1_2_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

mtflib-1.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

mtflib-1.4.3-cp39-cp39-win_amd64.whl (232.5 kB view details)

Uploaded CPython 3.9Windows x86-64

mtflib-1.4.3-cp39-cp39-musllinux_1_2_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.9musllinux: musl 1.2+ x86-64

mtflib-1.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

mtflib-1.4.3-cp38-cp38-win_amd64.whl (229.6 kB view details)

Uploaded CPython 3.8Windows x86-64

mtflib-1.4.3-cp38-cp38-musllinux_1_2_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.8musllinux: musl 1.2+ x86-64

mtflib-1.4.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file mtflib-1.4.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: mtflib-1.4.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 234.6 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mtflib-1.4.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c9c3ff824b52b0bebb2664667748e33e2b4af00c0babf5ec77d121b122074385
MD5 5c030ec362372e455e1b6794a4cb1775
BLAKE2b-256 96838d62e90ade099554ef6246db6ed391c9a7874b6c0063023a426679e6e8fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp312-cp312-win_amd64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 54d097bd95c9b954b9e1834a35f394dfaadea9f1a590b4555f047b4c6358535e
MD5 6ee54e6df7e68dff62bdd7d5f94d73d3
BLAKE2b-256 d3bbdcc26e5509ccaa6635abca55266baad938d3e7c5399f02652459824aa733

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp312-cp312-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6ead87c880834d9b3fb4aa57147e27bda745ae941a1fc2d2585ffe6f1304486e
MD5 d281f2a5f4f65e1dd6a4552805f4c507
BLAKE2b-256 6e36e1169bb2ea35d6d1de5297fc24cc9593356e1b19d9dbb7c482be017455fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: mtflib-1.4.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 232.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mtflib-1.4.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 9675cb84e04a8fe756a26ea883fec03706a093f3fc66f4a3deb427b9dd489c6a
MD5 b7615e3e05a2e13a226f4f61f6f0d4d4
BLAKE2b-256 383f183f96546389255bd8f17ae8f0e9cc8690a62bd33688d769a9f6353d7a49

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp311-cp311-win_amd64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 38a1d3d228262ff8510d17f1f5efe3d08118d478f3078324488ce19293e38501
MD5 f128dda766d1ddcade3d29a59f6f03dc
BLAKE2b-256 e989da43fc3c610b098da1a168ce7d14c485037f6b238de68dc697cbc339ccf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp311-cp311-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dd194e87e9a7bc21c14d7ec88b3cadc5b4e4d8dda958cfe95a2476d83f72d1a1
MD5 33017a47f134d96b1cbc9caf3588b867
BLAKE2b-256 02fd3670535c861bca800fde070471570592800357045437f802306022904edf

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: mtflib-1.4.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 230.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mtflib-1.4.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4972bf60eaeb81b515c81495136bec4fb864edd0f9153b87d54c41be9414fbe1
MD5 ec24745717d5b9b0668df425a8e80295
BLAKE2b-256 ab785aecbdcadd2a79bfc46fef4163c4ae349a890139ec881bf4baf1998c891b

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp310-cp310-win_amd64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 a755ffdf35765552bb34d9f0311d9f049c0b88d77feb19dfd166eb49e0bb910f
MD5 750319457fcae7904b170dc28309b100
BLAKE2b-256 70b454718496d6ce1e79c4bb5662df908caa4c25ec38ad64c5a5067b494cc28e

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61e597c0f379db92483eb82f33274fb24aa46b73a07de0f3b55ea109f989ab41
MD5 cfa6194833a61b2e2ba88bdf9d6df4bb
BLAKE2b-256 485470654526103027c61f11f4697014771889060b36ed00cb1a9b5c6f00da5c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: mtflib-1.4.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 232.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mtflib-1.4.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 6035ae4f5d2b762f67bc335cd964336f8d85baead57dc3d272e159589c07f98c
MD5 1d4fff760c5cc3b14af20e7deebdd8db
BLAKE2b-256 05755bdd347e8403f986b69e00a2ec3b787bcda270ad548d2d92f45c4e6ed812

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp39-cp39-win_amd64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp39-cp39-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp39-cp39-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4ce7da1aed5e4be424e068640340d1847b34a478fb059b3cd4b377fc696c40b8
MD5 439cfca5876a0df29a5605c7d2342218
BLAKE2b-256 d90846b25a5c06a53aa828ad573f280279118468d22bb31ed7eb662115ef9d36

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp39-cp39-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a5e042b6b94486969ff5aa03eabfbc98d14ba165149eee244654c675d6746e6c
MD5 1a320e83742f6d269120fe4562546a74
BLAKE2b-256 67e2a884fc72ef8e721e485bbe3c799ae81d8e42a938628033e3806d8781ddc3

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: mtflib-1.4.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 229.6 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mtflib-1.4.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7d0f868d483b7ad3b09234f5024c5ee3b121e95abf42b92f78bb91f078a2b0c4
MD5 597149c207b6826b2f4f009fa63bd82d
BLAKE2b-256 8b158fdabe2ee770ef9b32dde487c4b43176a885da1814452993aa34c55ab6c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp38-cp38-win_amd64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp38-cp38-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp38-cp38-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e7049bcd0f7884de4c923ad2178c5ee9d2d0249aae066c7f6f6442dc5eb2c870
MD5 355b2109d29833642b82ce3b0dad0ea0
BLAKE2b-256 e84913212b3d8e85f6d4444177aa680536c50823f0542bbb717146c32e9e9eee

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp38-cp38-musllinux_1_2_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mtflib-1.4.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mtflib-1.4.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 26e145618ca4283e7e5d1ea898b7a3e2fb18f78bd419ef8240df3ae773ae667d
MD5 8a6b368d77c332ca605d291d67e5a24e
BLAKE2b-256 e90f0bf01a198821b64ad5201803bd418fb158b2f95b681cefb0d57c6542892d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mtflib-1.4.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-publish.yml on shashi-manikonda/MTFLibrary

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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