Skip to content

j-bowhay/scikit-zeros

Repository files navigation

scikit-zeros

Actions Status Documentation Status PyPI version PyPI platforms GitHub Discussion

scikit-zeros is a Python package for finding the all the roots of a holomorphic function in a given region of the complex plane. It is based on subdivision using the argument principle combined with AAA rational approximation of the logarithm derivative.

Installation

You can install scikit-zeros using pip:

pip install skzeros

Example

import numpy as np
import skzeros

A = -0.19435
B = 1000.41
C = 522463
T = 0.005


def f(z):
    return z**2 + A * z + B * np.exp(-T * z) + C


def f_z(z):
    return 2 * z + A - T * B * np.exp(-T * z)


r = skzeros.Rectangle(complex(-2500, -15000), complex(10, 15000))
res = skzeros.find_zeros(r, f, f_z, max_arg_principle=7)

See Also

About

A Numerical Method for Computing the Zeros of a Holomorphic Function

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •