当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


Python SciPy special.dawsn用法及代码示例


本文简要介绍 python 语言中 scipy.special.dawsn 的用法。

用法:

scipy.special.dawsn(x, out=None) = <ufunc 'dawsn'>#

道森积分。

计算:

exp(-x**2) * integral(exp(t**2), t=0..x).

参数

x array_like

函数参数。

out ndarray,可选

函数值的可选输出数组

返回

y 标量或 ndarray

积分值。

参考

[1]

Steven G. Johnson,Faddeeva W 函数实现。 http://ab-initio.mit.edu/Faddeeva

例子

>>> import numpy as np
>>> from scipy import special
>>> import matplotlib.pyplot as plt
>>> x = np.linspace(-15, 15, num=1000)
>>> plt.plot(x, special.dawsn(x))
>>> plt.xlabel('$x$')
>>> plt.ylabel('$dawsn(x)$')
>>> plt.show()
scipy-special-dawsn-1.png

相关用法


注:本文由纯净天空筛选整理自scipy.org大神的英文原创作品 scipy.special.dawsn。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。