Numerical solving of symbolic systems of non-linear equations.
Project description
pyneqsys provides a convenience class for representing and solving non-linear equation systems from SymPy expressions.
The numerical root finding is perfomed using scipy.optimize.root.
Documentation
Autogenerated API documentation is found here: https://bjodah.github.com/pyneqsys
Installation
Simplest way to install pyneqsys and its dependencies is through the conda package manager:
$ conda install -c bjodah pyneqsys pytest $ python -m pytest --pyargs pyneqsys
Source distribution is available here: https://pypi.python.org/pypi/pyneqsys
Example
Example reformulated from SciPy documentation:
>>> import sympy as sp
>>> import numpy as np
>>> from pyneqsys import SymbolicSys
>>> x = sp.symarray('x', 2)
>>> f = [x[0] + (x[0] - x[1])**3/2 - 1,
... (x[1] - x[0])**3/2 + x[1]]
>>> neqsys = SymbolicSys(x, f)
>>> x, sol = neqsys.solve_scipy([1, 0])
>>> assert sol.success
>>> print(x)
[ 0.8411639 0.1588361]
here we did not need to enter the jacobian manually, SymPy did that for us.
License
The source code is Open Source and is released under the simplified 2-clause BSD license. See LICENSE for further details. Contributors are welcome to suggest improvements at https://github.com/bjodah/pyneqsys
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyneqsys-0.1.2.tar.gz.
File metadata
- Download URL: pyneqsys-0.1.2.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96a655f70b00c0cf4a907e7793bdd9048c026e699b0cf0a728889171f7596938
|
|
| MD5 |
4545cd7e9e23dca40c2b5cb71d275ec4
|
|
| BLAKE2b-256 |
eb8ec4ceeee346a542d32140feca7f3a159d287de5eb1d40fbe1954be5fa4887
|