Skip to content

PyTropical is a Python package for tropical mathematics.

License

Notifications You must be signed in to change notification settings

heitorbaldo/PyTropical

Repository files navigation

PyTropical

License: MIT Open In Colab PyPI version


PyTropical is a Python package for tropical mathematics.

  • Free software: MIT license
  • Documentation: TODO

Installation

pip3 install pytropical

Examples

from pytropical.tropical_algebra import MaxPlusAlgebra, MinPlusAlgebra
from pytropical.utils import *

maxp = MaxPlusAlgebra()
inf = maxp.inf #inf is the additive zero

#tropical sum
maxp.trop_sum(2.8, 3)

#tropical multiplication
maxp.trop_mult(90, inf)

#tropical exponentiation
print("2^3 = 2⨀2⨀2 = ", maxp.trop_pow(2, 3))

More examples are available in the Jupyter Notebook.

Dependencies

  • NumPy

About

PyTropical is a Python package for tropical mathematics.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published