# Path: pyphysim/util/conversion.py
# def dB2Linear(valueIndB: NumberOrArray) -> NumberOrArray:
#     """
#     Convert input from dB to linear scale.
# 
#     Parameters
#     ----------
#     valueIndB : int | float | np.ndarray
#         Value in dB
# 
#     Returns
#     -------
#     valueInLinear : int | float | np.ndarray
#         Value in Linear scale.
# 
#     Examples
#     --------
#     >>> dB2Linear(30)
#     1000.0
#     """
#     return pow(10, valueIndB / 10.0)


from typing import Optional, TypeVar
from ..util.conversion import dB2Linear
import numpy as np

        Parameters
        ----------
        angle : float | np.ndarray
            Angle between the direction of interest and the boresight of
            the antenna. This can also be a numpy array with angles.

        Returns
        -------
        float | np.ndarray
            The gain (in linear scale) for the provided angle.
        """
        raise NotImplementedError("Implement in a subclass")


class AntGainOmni(AntGainBase):
    """
    Class for Omnidirectional antenna gain model.

    Parameters
    ----------
    ant_gain : float, optional
        The antenna gain (in dBi). If not provided then 0dBi will be assumed.
    """
    def __init__(self, ant_gain: Optional[float] = None):
        super().__init__()
        self.ant_gain: float
        if ant_gain is None:
            self.ant_gain = 1.0
        else:

# Path: pyphysim/util/conversion.py
# def dB2Linear(valueIndB: NumberOrArray) -> NumberOrArray:
#     """
#     Convert input from dB to linear scale.
# 
#     Parameters
#     ----------
#     valueIndB : int | float | np.ndarray
#         Value in dB
# 
#     Returns
#     -------
#     valueInLinear : int | float | np.ndarray
#         Value in Linear scale.
# 
#     Examples
#     --------
#     >>> dB2Linear(30)
#     1000.0
#     """
#     return pow(10, valueIndB / 10.0)


# Path: pyphysim/channels/antennagain.py
from typing import Optional, TypeVar
from ..util.conversion import dB2Linear
import numpy as np


        Parameters
        ----------
        angle : float | np.ndarray
            Angle between the direction of interest and the boresight of
            the antenna. This can also be a numpy array with angles.

        Returns
        -------
        float | np.ndarray
            The gain (in linear scale) for the provided angle.
        """
        raise NotImplementedError("Implement in a subclass")


class AntGainOmni(AntGainBase):
    """
    Class for Omnidirectional antenna gain model.

    Parameters
    ----------
    ant_gain : float, optional
        The antenna gain (in dBi). If not provided then 0dBi will be assumed.
    """
    def __init__(self, ant_gain: Optional[float] = None):
        super().__init__()
        self.ant_gain: float
        if ant_gain is None:
            self.ant_gain = 1.0
        else:

            self.ant_gain = dB2Linear(ant_gain)