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
{{ message }}
Repository navigation
Commit 9aa2c64
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -161,7 +172,7 @@ NumPy provides the basic array data type plus some simple processing operations.
161
172
162
173
For example, let's build some arrays
163
174
164
-
```{code-block} python3
175
+
```{code-cell} python3
165
176
import numpy as np # Load the library
166
177
167
178
a = np.linspace(-np.pi, np.pi, 100) # Create even grid from -π to π
@@ -171,7 +182,7 @@ c = np.sin(a) # Apply sin to each element of a
171
182
172
183
Now let's take the inner product
173
184
174
-
```{code-block} python3
185
+
```{code-cell} python3
175
186
b @ c
176
187
```
177
188
@@ -183,7 +194,7 @@ The [SciPy](http://www.scipy.org) library is built on top of NumPy and provides
183
194
184
195
For example, let's calculate $\int_{-2}^2 \phi(z) dz$ where $\phi$ is the standard normal density.
185
196
186
-
```{code-block} python3
197
+
```{code-cell} python3
187
198
from scipy.stats import norm
188
199
from scipy.integrate import quad
189
200
@@ -251,7 +262,7 @@ single: SymPy
251
262
252
263
The [SymPy](http://www.sympy.org/) library provides this functionality from within the Python shell.
253
264
254
-
```{code-block} python3
265
+
```{code-cell} python3
255
266
from sympy import Symbol
256
267
257
268
x, y = Symbol('x'), Symbol('y') # Treat 'x' and 'y' as algebraic symbols
@@ -260,32 +271,32 @@ x + x + x + y
260
271
261
272
We can manipulate expressions
262
273
263
-
```{code-block} python3
274
+
```{code-cell} python3
264
275
expression = (x + y)**2
265
276
expression.expand()
266
277
```
267
278
268
279
solve polynomials
269
280
270
-
```{code-block} python3
281
+
```{code-cell} python3
271
282
from sympy import solve
272
283
273
284
solve(x**2 + x + 2)
274
285
```
275
286
276
287
and calculate limits, derivatives and integrals
277
288
278
-
```{code-block} python3
289
+
```{code-cell} python3
279
290
from sympy import limit, sin, diff
280
291
281
292
limit(1 / x, x, 0)
282
293
```
283
294
284
-
```{code-block} python3
295
+
```{code-cell} python3
285
296
limit(sin(x) / x, x, 0)
286
297
```
287
298
288
-
```{code-block} python3
299
+
```{code-cell} python3
289
300
diff(sin(x), x)
290
301
```
291
302
@@ -313,7 +324,7 @@ Pandas is fast, efficient, flexible and well designed.
313
324
Here's a simple example, using some dummy data generated with Numpy's excellent
0 commit comments