Skip to content

Commit cc5197d

Browse files
authored
Add support for Python 3.8, 3.9 in notebook 4 (#8)
1 parent d16343c commit cc5197d

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

4_mstis_sampling_tutorial.ipynb

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,17 @@
218218
"outputs": [],
219219
"source": [
220220
"# some aspects of storage depend on Python version\n",
221-
"if sys.version_info > (3,):\n",
221+
"if sys.version_info < (3,):\n",
222+
" filename = \"./inputs/mstis_bootstrap_py2.nc\"\n",
223+
"elif (3, 6) <= sys.version_info < (3, 8):\n",
222224
" filename = \"./inputs/mstis_bootstrap_py3.nc\"\n",
225+
"elif (3, 8) <= sys.version_info < (3, 10):\n",
226+
" filename = \"./inputs/mstis_bootstrap_py38.nc\"\n",
223227
"else:\n",
224-
" filename = \"./inputs/mstis_bootstrap_py2.nc\""
228+
" raise RuntimeError(\n",
229+
" \"Uh oh! Looks like we don't have an input file for your Python version: \"\n",
230+
" + \".\".join(str(x) for x in sys.version_info[:3])\n",
231+
" )"
225232
]
226233
},
227234
{
@@ -606,7 +613,7 @@
606613
"name": "python",
607614
"nbconvert_exporter": "python",
608615
"pygments_lexer": "ipython3",
609-
"version": "3.7.3"
616+
"version": "3.8.10"
610617
},
611618
"toc": {
612619
"base_numbering": 1,

inputs/mstis_bootstrap_py38.nc

50.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)