Skip to main content
https://travis-ci.org/alphaomega-technology/Equation.svg?branch=v1.2.01

Equation Interpeter

The Equation Package provide an extentable Equation Parser and Evaluation System.

It will take a string such as “sin(x+y^2)” and convert it to a python object that can be called this allow the safe evaluation of equations stored in configuration files or enterned from the keyboard. This Package never calls a python evaluation command hence their is no risk of executing any unexpected python code.

The Generated Expression Object is desgined to behave like a python function, and can be used any where a python funcion is expected, it may be called with either positional or keyword arguments to set the Equations Variables, by default the order of the variables is as they appear in the equation, however an explicit order may be set when the Expression object is created.

Example

>>> from Equation import Expression
>>> fn = Expression("sin(x+y^2)",["y","x"])
>>> fn
sin((x + (y ^ (2+0j))))
>>> print fn
\sin\left(\left(x + y^{(2+0j)}\right)\right)
>>> fn(3,4)
(0.42016703682664092+0j)

Numpy Arrays Supported

The default function maping used by this package map the operators and functions to Numpy Functions, hence the generated object may be called with numpy arrays.

Latex Support

The display string format i.e. str() is set to use Latex syntax allowing high quality equations to be rendered in output this syntax is supported by the grqaphing package matplotlib

Future Versions

Goals for future versions are:

  • Reduce repr() type respresentation to use only required brackets

  • Allow the use of function variable, rather than just predefined functions

Release files for Equation 1.2.01

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for Equation 1.2.01
File Size Uploaded
Equation-1.2.01.zip 25.6 kB Details
Equation-1.2.01.tar.gz 17.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for Equation 1.2.01
File Interpreter ABI Platform
Equation-1.2.01.win32.exe Details
Equation-1.2.01-py2.7.egg Legacy Egg format - - Details

Total release size: 438.7 kB

Release files / Equation-1.2.01.zip

Download URL Equation-1.2.01.zip
Size 25.6 kB
Tags Source
SHA-256 checksum
How to use checksums
1e8d55e771ac18f33fcef5bdb126e4079fd42ce744ae915cd03760aab158260c
BLAKE2b-256 checksum
How to use checksums
2ecc115fb1722051f99b9699864586e7f96ca0080645387698af922fade4f7b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Equation-1.2.01.tar.gz

Download URL Equation-1.2.01.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c8a21dc47d6c748fd19b6485978cf8c42fe31c43db7f44789d95fb5e9752b81c
BLAKE2b-256 checksum
How to use checksums
fd0dede829e7c0c457b651de2792cd19a739e4885477f59832da54d2cc7a1982
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Equation-1.2.01.win32.exe

Download URL Equation-1.2.01.win32.exe
Size 255.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e066d131244e612e760ee0227a57e57285a55c35ae896fecc4e8cb847935ec61
BLAKE2b-256 checksum
How to use checksums
d75d650fdf8b75d01638a1fe5761669d321a83ee42dd5503bdc6b9c7cfb42169
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Equation-1.2.01-py2.7.egg

Download URL Equation-1.2.01-py2.7.egg
Size 139.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
8903160860fbef8b313a9d89ffff2cb4048a341f369b1c48086c4505eee7eb4d
BLAKE2b-256 checksum
How to use checksums
87551f695ef18a0f8192a92ba1555a583ca66defb3894354def95bfa24c4dfb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.2.01 This release

4 release files

1.2

4 release files

1.1.01

3 release files

1.1

3 release files

1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page