pooltool.ptmath.roots ===================== .. py:module:: pooltool.ptmath.roots Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 core/index.rst quadratic/index.rst quartic/index.rst Overview -------- .. list-table:: Function :header-rows: 0 :widths: auto :class: summarytable * - :py:obj:`solve_quartics `\ (ps, solver) - Returns the smallest positive and real root for each quartic polynomial. Functions --------- .. py:function:: solve_quartics(ps: numpy.typing.NDArray[numpy.float64], solver: QuarticSolver = QuarticSolver.HYBRID) -> numpy.typing.NDArray[numpy.float64] Returns the smallest positive and real root for each quartic polynomial. :param ps: A mx5 array of polynomial coefficients, where m is the number of equations. The columns are in the order a, b, c, d, e, where these coefficients make up the quartic polynomial equation at^4 + bt^3 + ct^2 + dt + e = 0. :param solver: The method used to calculate the roots. See pooltool.ptmath.roots.quartic.QuarticSolver. :returns: An array of shape m. Each value is the smallest root that is real and positive. If no such root exists (e.g. all roots have complex), then `np.inf` is returned. :rtype: roots