# Path: blond/utils/bmath.py
# def use_mpi():
# def mpiMode():
# def use_fftw():
# def use_precision(_precision='double'):
# def update_active_dict(new_dict):


from builtins import range, object
from scipy.constants import c, physical_constants
from scipy.special import gamma as gamma_func
from scipy.special import kv, airy, polygamma
from scipy import integrate
from ..utils import bmath as bm
import numpy as np
import mpmath
            Raised if
            * `high_frequency_transition` < 1
            * `low_frequency_transition` > 1
            * `high_frequency_transition` < `low_frequency_transition`

        Returns
        -------
        None.

        """

        # check for input consistency
        if high_frequency_transition <= low_frequency_transition:
            raise ValueError('high_frequency_transition ratio must be larger than the '
                             + 'low_frequency_transition rato')

        if high_frequency_transition < 1.0:
            raise ValueError('high_frequency_transition ratio must be greater than 1')

        if low_frequency_transition > 1.0:
            raise ValueError('low_frequency_transition ratio must be smaller than 1')

        if epsilon < 0 or epsilon > 1:
            raise ValueError('epsilon must be a small positive value')

        self.impedance = np.zeros_like(frequency_array, dtype=complex)

        l_array = frequency_array / self.f_crit

        # use the low frequency approximation where f < LFT * f_c

# Path: blond/utils/bmath.py
# def use_mpi():
# def mpiMode():
# def use_fftw():
# def use_precision(_precision='double'):
# def update_active_dict(new_dict):


# Path: blond/impedances/impedance_sources.py
from builtins import range, object
from scipy.constants import c, physical_constants
from scipy.special import gamma as gamma_func
from scipy.special import kv, airy, polygamma
from scipy import integrate
from ..utils import bmath as bm
import numpy as np
import mpmath

            Raised if
            * `high_frequency_transition` < 1
            * `low_frequency_transition` > 1
            * `high_frequency_transition` < `low_frequency_transition`

        Returns
        -------
        None.

        """

        # check for input consistency
        if high_frequency_transition <= low_frequency_transition:
            raise ValueError('high_frequency_transition ratio must be larger than the '
                             + 'low_frequency_transition rato')

        if high_frequency_transition < 1.0:
            raise ValueError('high_frequency_transition ratio must be greater than 1')

        if low_frequency_transition > 1.0:
            raise ValueError('low_frequency_transition ratio must be smaller than 1')

        if epsilon < 0 or epsilon > 1:
            raise ValueError('epsilon must be a small positive value')

        self.impedance = np.zeros_like(frequency_array, dtype=complex)

        l_array = frequency_array / self.f_crit

        # use the low frequency approximation where f < LFT * f_c

        low_indexes = bm.where(l_array, less_than=low_frequency_transition)