@@ -65,8 +65,8 @@ We then enter a q environment and define our parameters as q objects.
6565```
6666>>> q()
6767q) alpha:0.5f
68- q) x:(2.0, 2.0, 2.0, 2.0f)
69- q) y:(4.0, 4.0, 4.0, 4.0f)
68+ q) x:4#2 2 2 2f
69+ q) y:4#4 4 4 4f
7070```
7171
7272Finally, we exit the q environment and invoke the NAG routine.
@@ -105,17 +105,22 @@ Returns: x: float, ndarray, shape(n,n)
105105 nrmgrd: float
106106```
107107
108- Within our interactive PyQ session, we again begin by entering a q environment and defining our parameters as q objects .
108+ Within our interactive PyQ session, we begin importing the correlationby entering entering a q environment .
109109
110110```
111+ >>>
111112>>> q()
113+ ```
114+
115+ Next, we define our parameters as q objects.
116+
117+ ```
112118q) alpha:0.5f
113- q) x:(2.0, 2.0, 2.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)
119+ q) x:4#2 2 2 2f
120+ q) g:4 4#2 -1 0 0 -1 2 -1 0 0 -1 2 -1 0 0 -1 2f
116121q) opt:”B”
117122q) alpha:0.02f
118- q) w:( 100.0, 20.0, 20.0, 20.0f)
123+ q) w:4# 100 20 20 20f
119124```
120125
121126We then exit the q environment and invoke the NAG routine.
@@ -151,13 +156,19 @@ Returns: result: float
151156 abserr: float
152157```
153158
154- We start by entering a q environment and defining our parameters as q objects .
159+ We start by importing the quadrature module, then enter a q environment .
155160
156161```
162+ >>> from naginterfaces.library import quad
157163>>> q()
158- q) a:0.0f
159- q) b:2.0f
160- q) epsabs:0.0f
164+ ```
165+
166+ Next, we define our parameters as q objects.
167+
168+ ```
169+ q) a:0f
170+ q) b:2f
171+ q) epsabs:0f
161172q) epsrel:0.0001f
162173```
163174
@@ -166,7 +177,7 @@ Next, we exit the q environment and define an integrable Python function. To sa
166177```
167178q) \
168179>>> f(x):
169- ... return x*x
180+ return x*x
170181...
171182```
172183
0 commit comments