You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"The scientific Python stack consists of Numpy, Scipy, and Matplotlib. Numpy brings to Python what Matlab is well known for : strong array manipulation and matrix operations, elementary mathematical functions, random numbers, ..."
23
+
]
24
+
},
25
+
{
26
+
"cell_type": "code",
27
+
"collapsed": false,
28
+
"input": [
29
+
"import numpy as np\n",
30
+
"\n",
31
+
"A = np.ones(10)\n",
32
+
"B = np.arange(5, 10, 0.1) # like range(), but allows non-integer stride\n",
33
+
"C = np.linspace(0, 2 * np.pi, 30) # between a and b in c steps\n",
"Before we go on, a note on *namespaces*. A namespace is a way to \"partition\" your functions into different spaces. This is particularly useful because you may have functions with the same name, but they may not do the same thing :"
86
+
]
87
+
},
88
+
{
89
+
"cell_type": "code",
90
+
"collapsed": false,
91
+
"input": [
92
+
"print sin(0.5)\n",
93
+
"print np.sin(0.5)\n",
94
+
"\n",
95
+
"sin(0.5) == np.sin(0.5)"
96
+
],
97
+
"language": "python",
98
+
"metadata": {},
99
+
"outputs": [
100
+
{
101
+
"output_type": "stream",
102
+
"stream": "stdout",
103
+
"text": [
104
+
"0.479425538604\n",
105
+
"0.479425538604\n"
106
+
]
107
+
},
108
+
{
109
+
"metadata": {},
110
+
"output_type": "pyout",
111
+
"prompt_number": 41,
112
+
"text": [
113
+
"True"
114
+
]
115
+
}
116
+
],
117
+
"prompt_number": 41
118
+
},
119
+
{
120
+
"cell_type": "code",
121
+
"collapsed": false,
122
+
"input": [
123
+
"x = [] # x is an empty list ( not a numpy array here )\n",
"We're a growing community, and we have a website ! Check us out at"
23
+
]
24
+
},
25
+
{
26
+
"cell_type": "heading",
27
+
"level": 1,
28
+
"metadata": {},
29
+
"source": [
30
+
"**`princetonpy.com`**"
31
+
]
32
+
},
33
+
{
34
+
"cell_type": "markdown",
35
+
"metadata": {},
36
+
"source": [
37
+
"We have a discussion forum on which you're welcome to discuss Python-related stuffs and ask questions. It's a great place to do so, because everyone can then see the discussion, rather than having it by email."
38
+
]
39
+
},
40
+
{
41
+
"cell_type": "markdown",
42
+
"metadata": {},
43
+
"source": [
44
+
"Also : quick thanks to our sponsers : the **Department of Ecology and Evolutionary Biology**, the **Department of Geosciences**, and **Bryan Grenfell (EEB)** for some extra funding. We really appreciate it !"
0 commit comments