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

Name Type Description
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

Name Type Description
int Maximum of numerator and denominator degrees.

degrees

JuliaRatfun.degrees()

Get the numerator and denominator degrees.

Returns

Name Type Description
tuple (numerator_degree, denominator_degree).

get

JuliaRatfun.get(field)

Get a property from the underlying Julia object.

Parameters

Name Type Description Default
field Name of the property to retrieve. required

Returns

Name Type Description
The value of the requested property.

isempty

JuliaRatfun.isempty()

Check if the rational function is empty/undefined.

Returns

Name Type Description
bool True if the function is empty.

isreal

JuliaRatfun.isreal()

Check if the rational function has real coefficients.

Returns

Name Type Description
bool True if all coefficients are real.

poles

JuliaRatfun.poles()

Compute the poles of the rational function.

Returns

Name Type Description
np.ndarray: Array of pole locations in the complex plane.

residues

JuliaRatfun.residues()

Compute poles and their residues.

Returns

Name Type Description
tuple (poles, residues) as numpy arrays.

roots

JuliaRatfun.roots()

Compute the zeros of the rational function.

Returns

Name Type Description
np.ndarray: Array of zero locations in the complex plane.