December 2017
Intermediate to advanced
386 pages
10h 42m
English
Let's see the following example:
In [41]: from scipy.integrate import quadIn [42]: value, absolute_error = quad(f, -1, 1); \ ....: print (value)1.8090484758005436
We can obtain the implementation details by setting the optional full_output argument to True. This gives us an additional Python dictionary with useful information:
In [43]: value, abs_error, info = quad(f, -1, 1, full_output=True)In [44]: info.keys()Out[44]: ['rlist', 'last', 'elist', 'iord', 'alist', 'blist', 'neval']In [45]: print ("{0} function evaluations".format(info['neval']))21 function evaluationsIn [46]: print ("Used {0} subintervals".format(info['last']))Used 1 subintervals
To fully understand all of the different outputs of information, we need to know ...
Read now
Unlock full access