dreye.equalize_domains#

dreye.equalize_domains(domains, arrs, axes=None, fill_value=0, bounds_error=False, stack_axis=None, concatenate=False)[source]#

Equalize domains between different arrays.

Parameters:
domainslist of ndarray

List of 1-D arrays representing the domains to be equalized.

arrslist of ndarray

List of n-D arrays whose domains are to be equalized.

axesint or list of int, optional

The axis or axes along which the domains need to be equalized. If None, it assumes the last axis for all arrays, by default None.

fill_valueint, optional

The value to use for points outside of the interpolation range, by default 0.

bounds_errorbool, optional

If True, an error is thrown any time interpolation is attempted on a value outside of the range of x (where extrapolation is necessary). If False, out of bounds values are assigned fill_value. By default, it is set to False.

stack_axisint, optional

Axis along which the arrays have to be stacked. If None, the arrays are not stacked, by default None.

concatenatebool, optional

If True, the arrays are concatenated along the stack_axis, by default False.

Returns:
tuple of ndarray

A tuple containing the new domain and the new arrays.

Raises:
ValueError

If the domains cannot be equalized due to the range and difference of the domain values.