JuliaRatfun
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
| 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
Get the total degree of the rational function.
Returns
| int |
|
Maximum of numerator and denominator degrees. |
degrees
Get the numerator and denominator degrees.
Returns
| tuple |
|
(numerator_degree, denominator_degree). |
get
Get a property from the underlying Julia object.
Parameters
| field |
|
Name of the property to retrieve. |
required |
Returns
|
|
The value of the requested property. |
isempty
Check if the rational function is empty/undefined.
Returns
| bool |
|
True if the function is empty. |
isreal
Check if the rational function has real coefficients.
Returns
| bool |
|
True if all coefficients are real. |
poles
Compute the poles of the rational function.
Returns
|
|
np.ndarray: Array of pole locations in the complex plane. |
residues
Compute poles and their residues.
Returns
| tuple |
|
(poles, residues) as numpy arrays. |
roots
Compute the zeros of the rational function.
Returns
|
|
np.ndarray: Array of zero locations in the complex plane. |