@@ -16,7 +16,8 @@ Installation for both the NAG Library for *Python* and the PyQ extension to kdb+
1616To install the NAG Library for * Python* :
1717
1818```
19- $ python -m pip install --extra-index-url https:nag/com/downloads/py/naginterfaces_nag naginterfaces
19+ $ python -m pip install --extra-index-url
20+ https:nag/com/downloads/py/naginterfaces_nag naginterfaces
2021```
2122To install PyQ from Kx:
2223```
@@ -87,7 +88,8 @@ where $W$ is a diagonal matrix of weights.
8788The NAG Library for * Python* signature for this routine is below.
8889
8990```
90- naginterfaces.library.correg.corrmat_nearest_bounded(g,opt,alpha=None,w=None,errtol=0.0,maxits=0,maxit=200)
91+ naginterfaces.library.correg.corrmat_nearest_bounded(
92+ g,opt,alpha=None,w=None,errtol=0.0,maxits=0,maxit=200)
9193
9294Parameters: g: float, array-like, shape(n,n)
9395 opt: str, length 1
@@ -109,7 +111,8 @@ Within our interactive PyQ session, we again begin by entering a q environment a
109111>>> q()
110112q) alpha:0.5f
111113q) x:(2.0, 2.0, 2.0, 2.0f)
112- q) g:(2.0, -1.0, 0.0, 0.0f; -1.0, 2.0, -1.0, 0.0f; 0.0, -1.0, 2.0, -1.0f; 0.0, 0.0, -1.0, 2.0f)
114+ q) g:(2.0, -1.0, 0.0, 0.0f; -1.0, 2.0, -1.0, 0.0f;
115+ 0.0, -1.0, 2.0, -1.0f; 0.0, 0.0, -1.0, 2.0f)
113116q) opt:”B”
114117q) alpha:0.02f
115118q) w:(100.0, 20.0, 20.0, 20.0f)
170173With our problem now fully defined, we invoke the NAG routine to compute our solution.
171174
172175```
173- >>> result, error = quad.dim1_fin_smooth(f, float(q.a), float(q.b), float(q.epsabs), float(q.epsrel))
176+ >>> result, error = quad.dim1_fin_smooth(
177+ f, float(q.a), float(q.b), float(q.epsabs), float(q.epsrel))
174178>>> result # 2.6666666666666667
175179>>> error # 1.4802973661668755e-14
176180```
0 commit comments