printer_mathml.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:bce 作者: bce-toolkit 项目源码 文件源码
def print_mexp(expr, protected_header_enabled=False, protected_header_prefix="X", **settings):
    """Print an expression to a MathML object.

    :type protected_header_enabled: bool
    :type protected_header_prefix: str
    :param expr: The expression.
    :param protected_header_enabled: Whether the protected headers are enabled.
    :param protected_header_prefix: The prefix of the protected headers.
    :param settings: The settings.
    :rtype : bce.dom.mathml.all.Base
    :return: The printed MathML object.
    """

    # noinspection PyProtectedMember
    return _MathMLPrinter(
        settings,
        protected_header_enabled=protected_header_enabled,
        protected_header_prefix=protected_header_prefix
    ).doprint(_sympy.sympify(expr))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号