Skip to content

Commit 0740127

Browse files
committed
Merge branch 'master' of https://github.com/timeu/gwas-lecture
2 parents 9be9f52 + aa03091 commit 0740127

File tree

1 file changed

+43
-11
lines changed

1 file changed

+43
-11
lines changed

Lecture-1-Python-Data-Science-Guide.ipynb

Lines changed: 43 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
{
2929
"cell_type": "code",
30-
"execution_count": 1,
30+
"execution_count": 4,
3131
"metadata": {},
3232
"outputs": [],
3333
"source": [
@@ -116,7 +116,7 @@
116116
}
117117
],
118118
"source": [
119-
"# Create an array filled with 1 values\n",
119+
"# Create an array filled with 0 values\n",
120120
"np.zeros((2, 3))"
121121
]
122122
},
@@ -138,7 +138,7 @@
138138
}
139139
],
140140
"source": [
141-
"# Create an array filled with 0 values\n",
141+
"# Create an array filled with 1 values\n",
142142
"np.ones((2, 3))"
143143
]
144144
},
@@ -542,7 +542,6 @@
542542
]
543543
},
544544
{
545-
"attachments": {},
546545
"cell_type": "markdown",
547546
"metadata": {},
548547
"source": [
@@ -556,7 +555,7 @@
556555
},
557556
{
558557
"cell_type": "code",
559-
"execution_count": 21,
558+
"execution_count": 5,
560559
"metadata": {},
561560
"outputs": [
562561
{
@@ -565,7 +564,7 @@
565564
"array([5, 6, 7])"
566565
]
567566
},
568-
"execution_count": 21,
567+
"execution_count": 5,
569568
"metadata": {},
570569
"output_type": "execute_result"
571570
}
@@ -579,7 +578,7 @@
579578
},
580579
{
581580
"cell_type": "code",
582-
"execution_count": 22,
581+
"execution_count": 6,
583582
"metadata": {},
584583
"outputs": [
585584
{
@@ -588,7 +587,7 @@
588587
"array([5, 6, 7])"
589588
]
590589
},
591-
"execution_count": 22,
590+
"execution_count": 6,
592591
"metadata": {},
593592
"output_type": "execute_result"
594593
}
@@ -602,8 +601,41 @@
602601
"cell_type": "markdown",
603602
"metadata": {},
604603
"source": [
605-
"NumPy provides basic mathematical and statistical functions like mean, min, max, sum, prod, std, var, summation across different axes, transposing of a matrix, etc.\n",
606-
"\n",
604+
"NumPy provides basic mathematical and statistical functions like mean, min, max, sum, prod, std, var, summation across different axes, transposing of a matrix, etc."
605+
]
606+
},
607+
{
608+
"cell_type": "code",
609+
"execution_count": 15,
610+
"metadata": {},
611+
"outputs": [
612+
{
613+
"name": "stdout",
614+
"output_type": "stream",
615+
"text": [
616+
"mean: 6.0\n",
617+
"std: 0.816496580927726\n",
618+
"sum: 18\n",
619+
"var: 0.6666666666666666\n",
620+
"min: 5\n",
621+
"max: 7\n"
622+
]
623+
}
624+
],
625+
"source": [
626+
"c = a + b\n",
627+
"print(\"mean: %s\" % c.mean())\n",
628+
"print(\"std: %s\" % c.std())\n",
629+
"print(\"sum: %s\" % c.sum())\n",
630+
"print(\"var: %s\" % c.var())\n",
631+
"print(\"min: %s\" % c.min())\n",
632+
"print(\"max: %s\" % c.max())"
633+
]
634+
},
635+
{
636+
"cell_type": "markdown",
637+
"metadata": {},
638+
"source": [
607639
"A particular NumPy feature of interest is solving a system of linear equations. NumPy has a function to solve linear equations. \n",
608640
"For example these linear equations \n",
609641
"\n",
@@ -4753,7 +4785,7 @@
47534785
"name": "python",
47544786
"nbconvert_exporter": "python",
47554787
"pygments_lexer": "ipython2",
4756-
"version": "2.7.15"
4788+
"version": "2.7.15rc1"
47574789
}
47584790
},
47594791
"nbformat": 4,

0 commit comments

Comments
 (0)