Skip to content

Commit a9260f1

Browse files
committed
updates to remove deprecation warnings
1 parent bdfefde commit a9260f1

File tree

1 file changed

+99
-38
lines changed

1 file changed

+99
-38
lines changed

docs/Winpython_checker.ipynb

Lines changed: 99 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
{
1111
"cell_type": "code",
1212
"execution_count": null,
13-
"metadata": {},
13+
"metadata": {
14+
"tags": []
15+
},
1416
"outputs": [],
1517
"source": [
1618
"import warnings\n",
@@ -23,10 +25,12 @@
2325
{
2426
"cell_type": "code",
2527
"execution_count": null,
26-
"metadata": {},
28+
"metadata": {
29+
"tags": []
30+
},
2731
"outputs": [],
2832
"source": [
29-
"%matplotlib inline\n",
33+
"%matplotlib widget\n",
3034
"# use %matplotlib widget for the adventurous"
3135
]
3236
},
@@ -56,7 +60,9 @@
5660
{
5761
"cell_type": "code",
5862
"execution_count": null,
59-
"metadata": {},
63+
"metadata": {
64+
"tags": []
65+
},
6066
"outputs": [],
6167
"source": [
6268
"# checking Numba JIT toolchain\n",
@@ -69,7 +75,7 @@
6975
"\n",
7076
"from numba import jit\n",
7177
"\n",
72-
"@jit\n",
78+
"@jit(nopython=True)\n",
7379
"def create_fractal(min_x, max_x, min_y, max_y, image, iters , mandelx):\n",
7480
" height = image.shape[0]\n",
7581
" width = image.shape[1]\n",
@@ -83,7 +89,7 @@
8389
" color = mandelx(real, imag, iters)\n",
8490
" image[y, x] = color\n",
8591
"\n",
86-
"@jit\n",
92+
"@jit(nopython=True)\n",
8793
"def mandel(x, y, max_iters):\n",
8894
" c = complex(x, y)\n",
8995
" z = 0.0j\n",
@@ -97,7 +103,9 @@
97103
{
98104
"cell_type": "code",
99105
"execution_count": null,
100-
"metadata": {},
106+
"metadata": {
107+
"tags": []
108+
},
101109
"outputs": [],
102110
"source": [
103111
"# Numba speed\n",
@@ -122,7 +130,9 @@
122130
{
123131
"cell_type": "code",
124132
"execution_count": null,
125-
"metadata": {},
133+
"metadata": {
134+
"tags": []
135+
},
126136
"outputs": [],
127137
"source": [
128138
"# Cython + Mingwpy compiler toolchain test\n",
@@ -132,7 +142,9 @@
132142
{
133143
"cell_type": "code",
134144
"execution_count": null,
135-
"metadata": {},
145+
"metadata": {
146+
"tags": []
147+
},
136148
"outputs": [],
137149
"source": [
138150
"%%cython -a\n",
@@ -166,7 +178,9 @@
166178
{
167179
"cell_type": "code",
168180
"execution_count": null,
169-
"metadata": {},
181+
"metadata": {
182+
"tags": []
183+
},
170184
"outputs": [],
171185
"source": [
172186
"#Cython speed\n",
@@ -189,7 +203,9 @@
189203
{
190204
"cell_type": "code",
191205
"execution_count": null,
192-
"metadata": {},
206+
"metadata": {
207+
"tags": []
208+
},
193209
"outputs": [],
194210
"source": [
195211
"# Matplotlib 3.4.1\n",
@@ -225,7 +241,9 @@
225241
{
226242
"cell_type": "code",
227243
"execution_count": null,
228-
"metadata": {},
244+
"metadata": {
245+
"tags": []
246+
},
229247
"outputs": [],
230248
"source": [
231249
"# Seaborn\n",
@@ -239,7 +257,9 @@
239257
{
240258
"cell_type": "code",
241259
"execution_count": null,
242-
"metadata": {},
260+
"metadata": {
261+
"tags": []
262+
},
243263
"outputs": [],
244264
"source": [
245265
"# altair-example \n",
@@ -256,13 +276,16 @@
256276
{
257277
"cell_type": "code",
258278
"execution_count": null,
259-
"metadata": {},
279+
"metadata": {
280+
"tags": []
281+
},
260282
"outputs": [],
261283
"source": [
262284
"# temporary warning removal\n",
263285
"import warnings\n",
264286
"import matplotlib as mpl\n",
265-
"warnings.filterwarnings(\"ignore\", category=mpl.cbook.MatplotlibDeprecationWarning)\n",
287+
"#warnings.filterwarnings(\"ignore\", category=mpl.cbook.MatplotlibDeprecationWarning)\n",
288+
"warnings.filterwarnings(\"ignore\", category=mpl.MatplotlibDeprecationWarning)\n",
266289
"# Holoviews\n",
267290
"# for more example, see http://holoviews.org/Tutorials/index.html\n",
268291
"import numpy as np\n",
@@ -281,7 +304,9 @@
281304
{
282305
"cell_type": "code",
283306
"execution_count": null,
284-
"metadata": {},
307+
"metadata": {
308+
"tags": []
309+
},
285310
"outputs": [],
286311
"source": [
287312
"# Bokeh 0.12.5 \n",
@@ -305,7 +330,9 @@
305330
{
306331
"cell_type": "code",
307332
"execution_count": null,
308-
"metadata": {},
333+
"metadata": {
334+
"tags": []
335+
},
309336
"outputs": [],
310337
"source": [
311338
"# Datashader (holoviews+Bokeh)\n",
@@ -341,7 +368,9 @@
341368
{
342369
"cell_type": "code",
343370
"execution_count": null,
344-
"metadata": {},
371+
"metadata": {
372+
"tags": []
373+
},
345374
"outputs": [],
346375
"source": [
347376
"np.random.seed(1)\n",
@@ -353,7 +382,9 @@
353382
{
354383
"cell_type": "code",
355384
"execution_count": null,
356-
"metadata": {},
385+
"metadata": {
386+
"tags": []
387+
},
357388
"outputs": [],
358389
"source": [
359390
"ropts = dict(colorbar=True, tools=[\"hover\"], width=350)\n",
@@ -364,7 +395,9 @@
364395
{
365396
"cell_type": "code",
366397
"execution_count": null,
367-
"metadata": {},
398+
"metadata": {
399+
"tags": []
400+
},
368401
"outputs": [],
369402
"source": [
370403
"#bqplot\n",
@@ -381,7 +414,9 @@
381414
{
382415
"cell_type": "code",
383416
"execution_count": null,
384-
"metadata": {},
417+
"metadata": {
418+
"tags": []
419+
},
385420
"outputs": [],
386421
"source": [
387422
"# ipyleaflet (javascript library usage)\n",
@@ -404,7 +439,9 @@
404439
{
405440
"cell_type": "code",
406441
"execution_count": null,
407-
"metadata": {},
442+
"metadata": {
443+
"tags": []
444+
},
408445
"outputs": [],
409446
"source": [
410447
"dc.on_draw(handle_draw)\n",
@@ -414,7 +451,9 @@
414451
{
415452
"cell_type": "code",
416453
"execution_count": null,
417-
"metadata": {},
454+
"metadata": {
455+
"tags": []
456+
},
418457
"outputs": [],
419458
"source": [
420459
"%matplotlib widget\n",
@@ -432,7 +471,9 @@
432471
{
433472
"cell_type": "code",
434473
"execution_count": null,
435-
"metadata": {},
474+
"metadata": {
475+
"tags": []
476+
},
436477
"outputs": [],
437478
"source": [
438479
"# plotnine: giving a taste of ggplot of R langage (formerly we were using ggpy)\n",
@@ -461,11 +502,13 @@
461502
{
462503
"cell_type": "code",
463504
"execution_count": null,
464-
"metadata": {},
505+
"metadata": {
506+
"tags": []
507+
},
465508
"outputs": [],
466509
"source": [
467510
"# Audio Example : https://github.com/ipython/ipywidgets/blob/master/examples/Beat%20Frequencies.ipynb\n",
468-
"%matplotlib inline\n",
511+
"%matplotlib widget\n",
469512
"import matplotlib.pyplot as plt\n",
470513
"import numpy as np\n",
471514
"from ipywidgets import interactive\n",
@@ -493,7 +536,7 @@
493536
"outputs": [],
494537
"source": [
495538
"# Networks graph Example : https://github.com/ipython/ipywidgets/blob/master/examples/Exploring%20Graphs.ipynb\n",
496-
"%matplotlib inline\n",
539+
"%matplotlib widget\n",
497540
"from ipywidgets import interact\n",
498541
"import matplotlib.pyplot as plt\n",
499542
"import networkx as nx\n",
@@ -596,14 +639,16 @@
596639
{
597640
"cell_type": "code",
598641
"execution_count": null,
599-
"metadata": {},
642+
"metadata": {
643+
"tags": []
644+
},
600645
"outputs": [],
601646
"source": [
602647
"#Pandas \n",
603648
"import pandas as pd\n",
604649
"import numpy as np\n",
605650
"\n",
606-
"idx = pd.date_range('2000', '2005', freq='d', closed='left')\n",
651+
"idx = pd.date_range('2000', '2005', freq='d', inclusive='left')\n",
607652
"datas = pd.DataFrame({'Color': [ 'green' if x> 1 else 'red' for x in np.random.randn(len(idx))], \n",
608653
" 'Measure': np.random.randn(len(idx)), 'Year': idx.year},\n",
609654
" index=idx.date)\n",
@@ -623,7 +668,9 @@
623668
{
624669
"cell_type": "code",
625670
"execution_count": null,
626-
"metadata": {},
671+
"metadata": {
672+
"tags": []
673+
},
627674
"outputs": [],
628675
"source": [
629676
"datas.query('Measure > 0').groupby(['Color','Year']).size().unstack()"
@@ -730,7 +777,9 @@
730777
{
731778
"cell_type": "code",
732779
"execution_count": null,
733-
"metadata": {},
780+
"metadata": {
781+
"tags": []
782+
},
734783
"outputs": [],
735784
"source": [
736785
"# checking sympy \n",
@@ -750,7 +799,9 @@
750799
{
751800
"cell_type": "code",
752801
"execution_count": null,
753-
"metadata": {},
802+
"metadata": {
803+
"tags": []
804+
},
754805
"outputs": [],
755806
"source": [
756807
"# checking Ipython-sql, sqlparse, SQLalchemy\n",
@@ -760,7 +811,9 @@
760811
{
761812
"cell_type": "code",
762813
"execution_count": null,
763-
"metadata": {},
814+
"metadata": {
815+
"tags": []
816+
},
764817
"outputs": [],
765818
"source": [
766819
"%%sql sqlite:///.baresql.db\n",
@@ -774,7 +827,9 @@
774827
{
775828
"cell_type": "code",
776829
"execution_count": null,
777-
"metadata": {},
830+
"metadata": {
831+
"tags": []
832+
},
778833
"outputs": [],
779834
"source": [
780835
"# checking baresql\n",
@@ -792,7 +847,9 @@
792847
{
793848
"cell_type": "code",
794849
"execution_count": null,
795-
"metadata": {},
850+
"metadata": {
851+
"tags": []
852+
},
796853
"outputs": [],
797854
"source": [
798855
"# Transfering Datas to sqlite, doing transformation in sql, going back to Pandas and Matplotlib\n",
@@ -807,7 +864,9 @@
807864
{
808865
"cell_type": "code",
809866
"execution_count": null,
810-
"metadata": {},
867+
"metadata": {
868+
"tags": []
869+
},
811870
"outputs": [],
812871
"source": [
813872
"# checking db.py\n",
@@ -819,7 +878,9 @@
819878
{
820879
"cell_type": "code",
821880
"execution_count": null,
822-
"metadata": {},
881+
"metadata": {
882+
"tags": []
883+
},
823884
"outputs": [],
824885
"source": [
825886
"db.tables"
@@ -996,7 +1057,7 @@
9961057
"name": "python",
9971058
"nbconvert_exporter": "python",
9981059
"pygments_lexer": "ipython3",
999-
"version": "3.10.6"
1060+
"version": "3.10.11"
10001061
},
10011062
"widgets": {
10021063
"state": {

0 commit comments

Comments
 (0)