Skip to content

Commit c5dbcc5

Browse files
committed
Updated for MK27.1.
1 parent a0f6eb2 commit c5dbcc5

17 files changed

+60
-60
lines changed

hands-on-exercises/implied-volatility-q.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"name": "python",
6969
"nbconvert_exporter": "python",
7070
"pygments_lexer": "ipython3",
71-
"version": "3.8.0"
71+
"version": "3.8.5"
7272
}
7373
},
7474
"nbformat": 4,

hands-on-exercises/odes-q.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"name": "python",
6666
"nbconvert_exporter": "python",
6767
"pygments_lexer": "ipython3",
68-
"version": "3.8.0"
68+
"version": "3.8.5"
6969
}
7070
},
7171
"nbformat": 4,

hands-on-exercises/opt-q.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"\n",
1717
"One can see from the HTML documentation [here](https://www.nag.com/numeric/py/nagdoc_latest/naginterfaces.library.html) that the relevant algorithmic submodule for (local) optimization is `opt`.\n",
1818
"\n",
19-
"Studying the `opt` Functionality Index confirms that a suitable optimization solver to call is `one_var_func`. The HTML documentation for this solver is [here](https://www.nag.com/numeric/py/nagdoc_latest/naginterfaces.library.opt.html#naginterfaces.library.opt.one_var_func.)\n",
19+
"Studying the `opt` Functionality Index confirms that a suitable optimization solver to call is `one_var_func`. The HTML documentation for this solver is [here](https://www.nag.com/numeric/py/nagdoc_latest/naginterfaces.library.opt.one_var_func.html.)\n",
2020
"\n",
2121
"Write a program to find the minimum of the function $x^2 + 3x - 5$ using `one_var_func`. Assume that the required minimum lies in the range $[-6.0,4.0]$.\n"
2222
]
@@ -122,7 +122,7 @@
122122
"name": "python",
123123
"nbconvert_exporter": "python",
124124
"pygments_lexer": "ipython3",
125-
"version": "3.8.0"
125+
"version": "3.8.5"
126126
}
127127
},
128128
"nbformat": 4,

hands-on-exercises/option-pricing-q.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"name": "python",
7777
"nbconvert_exporter": "python",
7878
"pygments_lexer": "ipython3",
79-
"version": "3.8.0"
79+
"version": "3.8.5"
8080
}
8181
},
8282
"nbformat": 4,

hands-on-exercises/polyfit-q.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"name": "python",
7272
"nbconvert_exporter": "python",
7373
"pygments_lexer": "ipython3",
74-
"version": "3.8.0"
74+
"version": "3.8.5"
7575
}
7676
},
7777
"nbformat": 4,

hands-on-exercises/reg-q.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
"name": "python",
114114
"nbconvert_exporter": "python",
115115
"pygments_lexer": "ipython3",
116-
"version": "3.8.0"
116+
"version": "3.8.5"
117117
}
118118
},
119119
"nbformat": 4,

hands-on-exercises/reg_fun.py

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ def gen_multivar_x(m, n, statecomm, dist_id="MN", sigma=2.0, rho=0.5):
2424

2525
# NAG arguments for multivar_XXX functions
2626
mode = 2
27-
r = np.zeros(m*(m+1) + 2)
27+
comm = {}
2828

2929
# call random sampling
3030
if dist_id == "MN":
3131
sorder = 1
32-
r, x = rand.multivar_normal(sorder, mode, n, xmu, c, r, statecomm)
32+
x = rand.multivar_normal(sorder, mode, n, xmu, c, comm, statecomm)
3333
if dist_id == "T3":
3434
df = 3
3535
c_t = (float(df) - 2) / float(df) * c
36-
r, x = rand.multivar_students_t(mode, n, df, xmu, c_t, r, statecomm)
36+
x = rand.multivar_students_t(mode, n, df, xmu, c_t, comm, statecomm)
3737

3838
return x
3939

hands-on-exercises/short-q.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
"name": "python",
8383
"nbconvert_exporter": "python",
8484
"pygments_lexer": "ipython3",
85-
"version": "3.8.0"
85+
"version": "3.8.5"
8686
}
8787
},
8888
"nbformat": 4,

hands-on-solutions/implied-volatility-a.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@
202202
"name": "python",
203203
"nbconvert_exporter": "python",
204204
"pygments_lexer": "ipython3",
205-
"version": "3.8.0"
205+
"version": "3.8.5"
206206
}
207207
},
208208
"nbformat": 4,

hands-on-solutions/odes-a.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
"name": "python",
178178
"nbconvert_exporter": "python",
179179
"pygments_lexer": "ipython3",
180-
"version": "3.8.0"
180+
"version": "3.8.5"
181181
}
182182
},
183183
"nbformat": 4,

hands-on-solutions/opt-a.ipynb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"\n",
1717
"One can see from the HTML documentation [here](https://www.nag.com/numeric/py/nagdoc_latest/naginterfaces.library.html) that the relevant algorithmic submodule for (local) optimization is `opt`.\n",
1818
"\n",
19-
"Studying the `opt` Functionality Index confirms that a suitable optimization solver to call is `one_var_func`. The HTML documentation for this solver is [here](https://www.nag.com/numeric/py/nagdoc_latest/naginterfaces.library.opt.html#naginterfaces.library.opt.one_var_func.)\n",
19+
"Studying the `opt` Functionality Index confirms that a suitable optimization solver to call is `one_var_func`. The HTML documentation for this solver is [here](https://www.nag.com/numeric/py/nagdoc_latest/naginterfaces.library.opt.one_var_func.html.)\n",
2020
"\n",
2121
"Write a program to find the minimum of the function $x^2 + 3x - 5$ using `one_var_func`. Assume that the required minimum lies in the range $[-6.0,4.0]$.\n"
2222
]
@@ -30,7 +30,7 @@
3030
"name": "stdout",
3131
"output_type": "stream",
3232
"text": [
33-
"nag_return_data(e1=1e-08, e2=1e-08, a=-1.5, b=0.0, maxcal=6, x=-1.499999975, f=-7.25)\n"
33+
"OneVarFuncReturnData(e1=1e-08, e2=1e-08, a=-1.5, b=0.0, maxcal=6, x=-1.499999975, f=-7.25)\n"
3434
]
3535
}
3636
],
@@ -113,7 +113,7 @@
113113
"name": "stdout",
114114
"output_type": "stream",
115115
"text": [
116-
"nag_return_data(bl=array([-2., -1.]), bu=array([1., 1.]), x=array([-1.56951417, -0.0358072 ]), f=-2.0, iw=array([1, 2, 2, 2]), w=array([ 0.00000000e+000, -4.70114194e-009, 6.25037429e+000,\n",
116+
"BoundsQuasiFuncEasyReturnData(bl=array([-2., -1.]), bu=array([1., 1.]), x=array([-1.56951417, -0.0358072 ]), f=-2.0, iw=array([1, 2, 2, 2]), w=array([ 0.00000000e+000, -4.70114194e-009, 6.25037429e+000,\n",
117117
" 7.78883445e-001, 4.17710202e-236, 4.49150482e+077,\n",
118118
" -1.56951417e+000, -3.58071805e-002, -1.56951414e+000,\n",
119119
" -3.58073978e-002, -1.08174744e-003, 6.82317440e-003,\n",
@@ -187,7 +187,7 @@
187187
"name": "stdout",
188188
"output_type": "stream",
189189
"text": [
190-
"nag_return_data(bl=array([-2., -1.]), bu=array([1., 1.]), x=array([-0.40998172, 1. ]), f=-1.5855074116537922, iw=array([ 1, -1, 1, -1]), w=array([ 4.38832894e-008, 0.00000000e+000, 1.00000000e+000,\n",
190+
"BoundsQuasiFuncEasyReturnData(bl=array([-2., -1.]), bu=array([1., 1.]), x=array([-0.40998172, 1. ]), f=-1.5855074116537922, iw=array([ 1, -1, 1, -1]), w=array([ 4.38832894e-008, 0.00000000e+000, 1.00000000e+000,\n",
191191
" 7.78883445e-001, 4.17710202e-236, 4.49150482e+077,\n",
192192
" 1.00000000e+000, 1.00000000e+000, -1.58550741e+000,\n",
193193
" -1.05114491e+000, -1.00000000e+000, 0.00000000e+000,\n",
@@ -343,9 +343,9 @@
343343
"naginterfaces.base.opt.nlp1_solve: 6 1 1.0E+00 -1.999915E+00 3.7E-02 2.8E+00\n",
344344
"naginterfaces.base.opt.nlp1_solve: 7 1 1.0E+00 -2.000000E+00 1.2E-03 2.6E+00\n",
345345
"naginterfaces.base.opt.nlp1_solve: 8 1 1.0E+00 -2.000000E+00 6.4E-05 2.7E+00\n",
346-
"naginterfaces.base.opt.nlp1_solve: 9 1 1.0E+00 -2.000000E+00 6.9E-07 2.7E+00\n",
346+
"naginterfaces.base.opt.nlp1_solve: 9 1 1.0E+00 -2.000000E+00 6.8E-07 2.7E+00\n",
347347
"naginterfaces.base.opt.nlp1_solve: Mnr itn 1 -- Re-solve QP subproblem.\n",
348-
"naginterfaces.base.opt.nlp1_solve: 10 2 1.0E+00 -2.000000E+00 7.7E-07 2.7E+00 C\n",
348+
"naginterfaces.base.opt.nlp1_solve: 10 2 1.0E+00 -2.000000E+00 7.7E-07 2.6E+00 C\n",
349349
"naginterfaces.base.opt.nlp1_solve:\n",
350350
"naginterfaces.base.opt.nlp1_solve: Exit from NP problem after 10 major iterations,\n",
351351
"naginterfaces.base.opt.nlp1_solve: 16 minor iterations.\n",
@@ -554,7 +554,7 @@
554554
"source": [
555555
"from naginterfaces.library import glopt\n",
556556
"def g_mcs(x,_nstate):\n",
557-
" return g(x);\n",
557+
" return g(x)\n",
558558
"\n",
559559
"comm = glopt.bnd_mcs_init() # initialize solver\n",
560560
"start_time = time.time()\n",
@@ -616,7 +616,7 @@
616616
"name": "python",
617617
"nbconvert_exporter": "python",
618618
"pygments_lexer": "ipython3",
619-
"version": "3.8.0"
619+
"version": "3.8.5"
620620
}
621621
},
622622
"nbformat": 4,

hands-on-solutions/option-pricing-a.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
"name": "python",
186186
"nbconvert_exporter": "python",
187187
"pygments_lexer": "ipython3",
188-
"version": "3.8.0"
188+
"version": "3.8.5"
189189
}
190190
},
191191
"nbformat": 4,

hands-on-solutions/polyfit-a.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
"name": "python",
153153
"nbconvert_exporter": "python",
154154
"pygments_lexer": "ipython3",
155-
"version": "3.8.0"
155+
"version": "3.8.5"
156156
}
157157
},
158158
"nbformat": 4,

hands-on-solutions/reg-a.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@
402402
"name": "python",
403403
"nbconvert_exporter": "python",
404404
"pygments_lexer": "ipython3",
405-
"version": "3.8.0"
405+
"version": "3.8.5"
406406
}
407407
},
408408
"nbformat": 4,

hands-on-solutions/reg_fun.py

100644100755
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@ def gen_multivar_x(m, n, statecomm, dist_id="MN", sigma=2.0, rho=0.5):
2424

2525
# NAG arguments for multivar_XXX functions
2626
mode = 2
27-
r = np.zeros(m*(m+1) + 2)
27+
comm = {}
2828

2929
# call random sampling
3030
if dist_id == "MN":
3131
sorder = 1
32-
r, x = rand.multivar_normal(sorder, mode, n, xmu, c, r, statecomm)
32+
x = rand.multivar_normal(sorder, mode, n, xmu, c, comm, statecomm)
3333
if dist_id == "T3":
3434
df = 3
3535
c_t = (float(df) - 2) / float(df) * c
36-
r, x = rand.multivar_students_t(mode, n, df, xmu, c_t, r, statecomm)
36+
x = rand.multivar_students_t(mode, n, df, xmu, c_t, comm, statecomm)
3737

3838
return x
3939

hands-on-solutions/short-a.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"output_type": "stream",
3030
"text": [
3131
"3.141592653589793\n",
32-
"nag_return_data(din=1.9999999999999998, npts=15, relerr=6.106226635438361e-17)\n"
32+
"Dim1FinWellReturnData(din=1.9999999999999998, npts=15, relerr=6.106226635438361e-17)\n"
3333
]
3434
}
3535
],
@@ -158,7 +158,7 @@
158158
"name": "python",
159159
"nbconvert_exporter": "python",
160160
"pygments_lexer": "ipython3",
161-
"version": "3.8.0"
161+
"version": "3.8.5"
162162
}
163163
},
164164
"nbformat": 4,

0 commit comments

Comments
 (0)