用于python中的逆ERF函数的命令

时间:2022-04-17 22:01:36

What is the command to calculate Inverse Error function (erf) of a function in a python and which module is needed to import?

在python中计算函数的逆错误函数(erf)和需要导入哪个模块的命令是什么?

2 个解决方案

#1


12  

For the inverse error function, scipy.special has erfinv:

对于逆误差函数,scipy。特殊erfinv:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erfinv.html#scipy.special.erfinv

http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erfinv.html scipy.special.erfinv

In [4]: from scipy.special import erfinv

In [5]: erfinv(1)
Out[5]: inf

In [6]: erfinv(0.4)
Out[6]: 0.37080715859355784

#2


0  

I suggest to use scipy, a library that uses numpy.

我建议使用scipy,一个使用numpy的库。

the module you need to import to use is erfinv:

您需要导入使用的模块是erfinv:

from scipy.special import erfinv

Scipy is a key player for numerical software in Python. But it might be a little challenging getting started with it.

Scipy是Python中数值软件的关键角色。但是要开始使用它可能有点困难。

#1


12  

For the inverse error function, scipy.special has erfinv:

对于逆误差函数,scipy。特殊erfinv:

http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erfinv.html#scipy.special.erfinv

http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.erfinv.html scipy.special.erfinv

In [4]: from scipy.special import erfinv

In [5]: erfinv(1)
Out[5]: inf

In [6]: erfinv(0.4)
Out[6]: 0.37080715859355784

#2


0  

I suggest to use scipy, a library that uses numpy.

我建议使用scipy,一个使用numpy的库。

the module you need to import to use is erfinv:

您需要导入使用的模块是erfinv:

from scipy.special import erfinv

Scipy is a key player for numerical software in Python. But it might be a little challenging getting started with it.

Scipy是Python中数值软件的关键角色。但是要开始使用它可能有点困难。