# Path: scvelo/core/_arithmetic.py
# def invert(x: ndarray) -> ndarray:
#     """Invert array and set infinity to NaN.
# 
#     Arguments
#     ---------
#     x
#         Array to invert.
# 
#     Returns
#     -------
#     ndarray
#         Inverted array.
#     """
# 
#     with warnings.catch_warnings():
#         warnings.simplefilter("ignore")
#         x_inv = 1 / x * (x != 0)
#     return x_inv
# 
# Path: scvelo/core/_base.py
# class DynamicsBase(ABC):
#     @abstractmethod
#     def get_solution(
#         self, t: ndarray, stacked: True, with_keys: bool = False
#     ) -> Union[Dict, Tuple[ndarray], ndarray]:
#         """Calculate solution of dynamics.
# 
#         Arguments
#         ---------
#         t
#             Time steps at which to evaluate solution.
#         stacked
#             Whether to stack states or return them individually. Defaults to `True`.
#         with_keys
#             Whether to return solution labelled by variables in form of a dictionary.
#             Defaults to `False`.
# 
#         Returns
#         -------
#         Union[Dict, Tuple[ndarray], ndarray]
#             Solution of system. If `with_keys=True`, the solution is returned in form of
#             a dictionary with variables as keys. Otherwise, the solution is given as
#             a `numpy.ndarray` of form `(n_steps, n_vars)`.
#         """
# 
#         return
# 
#     @abstractmethod
#     def get_steady_states(
#         self, stacked: True, with_keys: False
#     ) -> Union[Dict[str, ndarray], Tuple[ndarray], ndarray]:
#         """Return steady state of system.
# 
#         Arguments
#         ---------
#         stacked
#             Whether to stack states or return them individually. Defaults to `True`.
#         with_keys
#             Whether to return solution labelled by variables in form of a dictionary.
#             Defaults to `False`.
# 
#         Returns
#         -------
#         Union[Dict[str, ndarray], Tuple[ndarray], ndarray]
#             Steady state of system.
#         """
# 
#         return


from typing import Dict, List, Tuple, Union
from numpy import ndarray
from ._arithmetic import invert
from ._base import DynamicsBase
import numpy as np
            self.s0 = val[:, 1]
        self._initial_state = val

    def get_solution(
        self, t: ndarray, stacked: bool = True, with_keys: bool = False
    ) -> Union[Dict, ndarray]:
        """Calculate solution of dynamics.

        Arguments
        ---------
        t
            Time steps at which to evaluate solution.
        stacked
            Whether to stack states or return them individually. Defaults to `True`.
        with_keys
            Whether to return solution labelled by variables in form of a dictionary.
            Defaults to `False`.

        Returns
        -------
        Union[Dict, ndarray]
            Solution of system. If `with_keys=True`, the solution is returned in form of
            a dictionary with variables as keys. Otherwise, the solution is given as
            a `numpy.ndarray` of form `(n_steps, 2)`.
        """

        expu = np.exp(-self.beta * t)
        exps = np.exp(-self.gamma * t)

        unspliced = self.u0 * expu + self.alpha / self.beta * (1 - expu)

# Path: scvelo/core/_arithmetic.py
# def invert(x: ndarray) -> ndarray:
#     """Invert array and set infinity to NaN.
# 
#     Arguments
#     ---------
#     x
#         Array to invert.
# 
#     Returns
#     -------
#     ndarray
#         Inverted array.
#     """
# 
#     with warnings.catch_warnings():
#         warnings.simplefilter("ignore")
#         x_inv = 1 / x * (x != 0)
#     return x_inv
# 
# Path: scvelo/core/_base.py
# class DynamicsBase(ABC):
#     @abstractmethod
#     def get_solution(
#         self, t: ndarray, stacked: True, with_keys: bool = False
#     ) -> Union[Dict, Tuple[ndarray], ndarray]:
#         """Calculate solution of dynamics.
# 
#         Arguments
#         ---------
#         t
#             Time steps at which to evaluate solution.
#         stacked
#             Whether to stack states or return them individually. Defaults to `True`.
#         with_keys
#             Whether to return solution labelled by variables in form of a dictionary.
#             Defaults to `False`.
# 
#         Returns
#         -------
#         Union[Dict, Tuple[ndarray], ndarray]
#             Solution of system. If `with_keys=True`, the solution is returned in form of
#             a dictionary with variables as keys. Otherwise, the solution is given as
#             a `numpy.ndarray` of form `(n_steps, n_vars)`.
#         """
# 
#         return
# 
#     @abstractmethod
#     def get_steady_states(
#         self, stacked: True, with_keys: False
#     ) -> Union[Dict[str, ndarray], Tuple[ndarray], ndarray]:
#         """Return steady state of system.
# 
#         Arguments
#         ---------
#         stacked
#             Whether to stack states or return them individually. Defaults to `True`.
#         with_keys
#             Whether to return solution labelled by variables in form of a dictionary.
#             Defaults to `False`.
# 
#         Returns
#         -------
#         Union[Dict[str, ndarray], Tuple[ndarray], ndarray]
#             Steady state of system.
#         """
# 
#         return


# Path: scvelo/core/_models.py
from typing import Dict, List, Tuple, Union
from numpy import ndarray
from ._arithmetic import invert
from ._base import DynamicsBase
import numpy as np

            self.s0 = val[:, 1]
        self._initial_state = val

    def get_solution(
        self, t: ndarray, stacked: bool = True, with_keys: bool = False
    ) -> Union[Dict, ndarray]:
        """Calculate solution of dynamics.

        Arguments
        ---------
        t
            Time steps at which to evaluate solution.
        stacked
            Whether to stack states or return them individually. Defaults to `True`.
        with_keys
            Whether to return solution labelled by variables in form of a dictionary.
            Defaults to `False`.

        Returns
        -------
        Union[Dict, ndarray]
            Solution of system. If `with_keys=True`, the solution is returned in form of
            a dictionary with variables as keys. Otherwise, the solution is given as
            a `numpy.ndarray` of form `(n_steps, 2)`.
        """

        expu = np.exp(-self.beta * t)
        exps = np.exp(-self.gamma * t)

        unspliced = self.u0 * expu + self.alpha / self.beta * (1 - expu)

        c = (self.alpha - self.u0 * self.beta) * invert(self.gamma - self.beta)