Numpy Error Function Erf
Contents |
2/sqrt(pi)*integral(exp(-t**2), t=0..z). Parameters:x
Python Erfc
: ndarray Input array. Returns:res : ndarray The values of
Module 'scipy' Has No Attribute 'special'
the error function at the given points x. See also erfc, erfinv, erfcinv Notes The cumulative of the unit normal distribution scipy erfinv is given by Phi(z) = 1/2[1 + erf(z/sqrt(2))]. References [R200]http://en.wikipedia.org/wiki/Error_function [R201]Milton Abramowitz and Irene A. Stegun, eds. Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. New York: Dover, 1972. http://www.math.sfu.ca/~cbm/aands/page_297.htm [R202]Steven G. Johnson, Faddeeva W function implementation. http://ab-initio.mit.edu/Faddeeva Previous topic scipy.special.multigammaln Next topic scipy.special.erfc © Copyright 2008-2009, The Scipy community. Last updated on May 11, 2014. Created using Sphinx 1.2.2.
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company python cumulative distribution function Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs scipy special Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, python error handling best practices just like you, helping each other. Join them; it only takes a minute: Sign up command for inverse ERF function in python [closed] up vote 7 down vote favorite What is the command to calculate Inverse Error https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.special.erf.html function (erf) of a function in a python and which module is needed to import? python python-2.7 python-3.x numpy share|improve this question asked Jul 7 '15 at 10:37 Naitik Mathur 442 closed as unclear what you're asking by jonrsharpe, ekad, cel, HaveNoDisplayName, Soner Gönül Jul 7 '15 at 14:50 Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what http://stackoverflow.com/questions/31266249/command-for-inverse-erf-function-in-python you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question. add a comment| 2 Answers 2 active oldest votes up vote 10 down vote For the inverse error function, scipy.special has 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 share|improve this answer answered Jul 7 '15 at 10:41 xnx 11.1k31541 add a comment| up vote 0 down vote I suggest to use scipy, a library that uses numpy. the module you need to import to use is 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. share|improve this answer edited Jul 7 '15 at 10:46 answered Jul 7 '15 at 10:40 DJanssens 1,8143826 add a comment| Not the answer you're looking for? Browse other questions tagged python python-2.7 python-3.x numpy or ask your own question. asked 1 year ago viewed 1657 times active 1 year ago Related 1146How can I represent an 'Enum' in Python?2316Calling an external command in Python5532What does the “yield” keyword do?3use of // in python1How can I change the default version on Python on linux in order to install and
Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats http://rajeshrinet.github.io/blog/2014/numpy-matplotlib/ purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard error function to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those! Plotting using matplotlib In[2]: %matplotlib inline import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 4*np.pi, 64) plt.plot(x, np.sin(x), '*-'); We can improve on the above plot in several numpy error function ways. E.g setting axis labels. setting axis limits. chossing color of our choice. putting legends ... In the plot below we have included some of these features along with another plot in the same figure. This can be used to compare between two plots on the same figure. In[13]: %matplotlib inline import numpy as np import matplotlib.pyplot as plt x = np.linspace(0, 4*np.pi, 64) plt.plot(x, np.sin(x), color="#348ABD", linewidth=2, linestyle="-", label='sin(x)'); plt.plot(x, np.cos(x), color="#A60628", linewidth= 3, linestyle="-", label='cos(x)'); plt.xlim([0, 4*np.pi]); plt.xlabel('x'); plt.legend(loc="lower left") Out[13]: