Skip to content

Commit b1b66d1

Browse files
authored
Merge pull request #774 from bashtage/fix-examples
BUG: Correct example
2 parents 8d6e536 + 6700dca commit b1b66d1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/univariate_volatility_scenarios.ipynb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,13 @@
2525
"outputs": [],
2626
"source": [
2727
"%matplotlib inline\n",
28+
"from __future__ import annotations\n",
29+
"\n",
2830
"import matplotlib.pyplot as plt\n",
2931
"import numpy as np\n",
3032
"import pandas as pd\n",
3133
"import seaborn as sns\n",
34+
"\n",
3235
"from arch.univariate import GARCH, ConstantMean, Normal\n",
3336
"\n",
3437
"sns.set_style(\"darkgrid\")\n",
@@ -205,7 +208,7 @@
205208
" shocks: np.ndarray[tuple[int], np.dtype[np.float64]],\n",
206209
" random_state: np.random.RandomState,\n",
207210
" ) -> None:\n",
208-
" self._shocks = shocks # 1d\n",
211+
" self._shocks = np.array(shocks, dtype=float).squeeze() # 1d\n",
209212
" self._rs = random_state\n",
210213
" self.n = shocks.shape[0]\n",
211214
"\n",

0 commit comments

Comments
 (0)