编程和建模工具集

pmxutils的Python项目详细描述


PMXUtils公司

MODX工具

请注意,该包正在开发中,可能会频繁更新

对于windows,使用python -m pip install pmxutils安装,对于unix/linux,使用python3 -m pip install pmxutils进行安装

目录

数学工具(pmxutils.mathtools

  • construct(expression, var=x)

    Returns a function computing the given expression

    • expression-要计算的数学表达式,type=string
    • var-数学表达式中使用的变量,默认为tp'x',type=string
  • `advConstruct(表达式,*args,constants={})

    Returns a function computing the given expression

    • expression-要计算的数学表达式,type=string
    • args-任意数量的单个参数,用于命名表达式中使用的变量,type=string
    • constants-表达式中包含任何数值常量的字典,type=dict
  • computeLists(function, low, high, step=1)

    Returns a touple of two lists containing x values inbetween low and high, and the computed results for y. In the format of (x_list, y_list)

    • low-函数限制的下限,type=number
    • high-函数限制的上限,type=number
    • function-用于y值计算的数学表达式,type=string或function from construct
    • step-x值列表中的步长,默认为“1”,type=number
  • newton(function, derivative, low, high, tolerance=1e-8, rounding = 3, iterations = 1000)

    Uses Newtons way of finding the root of a function, using the function and its derivative, within the given limits.Returns None if it can't find a solution that satisfies the tolerance after the defined number of terations

    • function-目标数学表达式,type=string或construct中的函数
    • derivative-目标数学表达式的导数,type=string或function from construct
    • low-应该检查根的are的下端,type=number
    • high-应该检查根的are的上端,type=number
    • tolerance-加速计算的误差容限,默认为'1e-8',type=number
    • rounding-将根的x值舍入到指定的小数位数,默认为“3”,type=number
    • iterations-尝试次数,之后函数将提前结束
  • isInbetween(number, low, high)

    Returns True if number is inbetween limOne and limTwo, returns False otherwise

    • number-要检查的数字,type=number
    • low-检查数字的下限,type=number
    • high-检查数字的上限,type=number
  • rectangleIntegral(function, low, high, n)

    Returns the numerically calculated integral of the function f inbetween a and b using n rectangles

    • function-要集成的函数,type=string或construct中的函数
    • low-要计算的区域的低端,type=number
    • high-要计算的区域的高端,type=number
    • n-要使用的矩形数,type=int
  • trapezoidIntegral(function, low, high, n)

    Returns the numerically calculated integral of the function f inbetween a and b using n trapezoids

    • function-要集成的函数,type=string或construct中的函数
    • low-要计算的区域的低端,type=number
    • high-要计算的区域的高端,type=number
    • n-要使用的梯形数,type=int
  • simpsonIntegral(function, low, high, n)

    Returns the numerically calculated integral of the function inbetween low and high using n quadratic splines

    • function-要集成的函数,type=string或construct中的函数
    • low-要计算的区域的低端,type=number
    • high-要计算的区域的高端,type=number
    • n-要使用的二次样条曲线的数目,type=int
  • euler(functionDerivative, low, high, y0, n)

    Returns a numpy array x, containing the x values of the function, and an array F, containing the computed values for the antiderivative function of the given function functionDerivative inbetween low and high with N steps

    Only supports functions with one variable

    • functionDerivative-目标函数的导数,type=string或function from construct
    • low-要计算的函数的低端,type=number
    • high-最高点要计算的区域的终点,类型=数字
    • y0-目标函数的初始值
    • n-要执行的计算数
  • lemma(a, b)

    Returns the greatest common denominator of a and b using the lemma algorithm

    • a-第一个数字
    • b-第二个数字

其他(pmxutils.other

  • profile(function)

    Time profiler. Prints out the elapsed time during function execution

    • function-要分析的函数,type=function

loading()

装载等级

  • start(flavor="loading")

    Starts a loading sequence

    • flavor-加载期间要显示的消息,默认为“加载”,type=string
  • stop()

    Stops the loading sequence

  • animate()

    DO NOT USE, internal function

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Spring 4升级后未加载java应用程序上下文   java Android 2.3.3 internet可以在我的Galaxy S上运行,但不能在我的Galaxy选项卡上运行?(许可?)   java通过不改变其原始位置对大小写字母进行排序   java Spring Boot一直在破坏我的电脑。。。sts的最佳配置是什么。Windows 10上的ini文件?   css Java Spring+引导问题   java Jackson将GeoJsonPoint序列化为纬度/经度   xml Java Transformer:如何将其结果生成OutputStream?   java如何更改字体、文本大小和设置文本位置?   在JavaSpringHibernate3.6.3中,如何告诉一个方法等待,直到获得锁,以及如何重试失败的事务?   java安卓服务代替线程   Java Swing使用鼠标移动JFrame