JuliaRatfun
JuliaRatfun(julia_obj)Python wrapper for Julia rational functions.
This class wraps Julia’s AbstractRationalFunction type, providing a Python interface for rational function operations including evaluation, arithmetic, and analysis of poles, zeros, and residues.
Attributes: julia: The underlying Julia rational function object.
Methods
| Name | Description |
|---|---|
| degree | Get the total degree of the rational function. |
| degrees | Get the numerator and denominator degrees. |
| get | Get a property from the underlying Julia object. |
| isempty | Check if the rational function is empty/undefined. |
| isreal | Check if the rational function has real coefficients. |
| poles | Compute the poles of the rational function. |
| residues | Compute poles and their residues. |
| roots | Compute the zeros of the rational function. |
degree
JuliaRatfun.degree()Get the total degree of the rational function.
Returns: int: Maximum of numerator and denominator degrees.
degrees
JuliaRatfun.degrees()Get the numerator and denominator degrees.
Returns: tuple: (numerator_degree, denominator_degree).
get
JuliaRatfun.get(field)Get a property from the underlying Julia object.
Args: field: Name of the property to retrieve.
Returns: The value of the requested property.
isempty
JuliaRatfun.isempty()Check if the rational function is empty/undefined.
Returns: bool: True if the function is empty.
isreal
JuliaRatfun.isreal()Check if the rational function has real coefficients.
Returns: bool: True if all coefficients are real.
poles
JuliaRatfun.poles()Compute the poles of the rational function.
Returns: np.ndarray: Array of pole locations in the complex plane.
residues
JuliaRatfun.residues()Compute poles and their residues.
Returns: tuple: (poles, residues) as numpy arrays.
roots
JuliaRatfun.roots()Compute the zeros of the rational function.
Returns: np.ndarray: Array of zero locations in the complex plane.