##// END OF EJS Templates
Fix small bug in display protocol example (numpy polynomials).
Fernando Perez -
Show More
@@ -127,7 +127,7 b''
127 127 },
128 128 {
129 129 "cell_type": "code",
130 "collapsed": true,
130 "collapsed": false,
131 131 "input": [
132 132 "x = Gaussian()",
133 133 "x"
@@ -144,7 +144,7 b''
144 144 },
145 145 {
146 146 "cell_type": "code",
147 "collapsed": true,
147 "collapsed": false,
148 148 "input": [
149 149 "x.png"
150 150 ],
@@ -154,7 +154,7 b''
154 154 },
155 155 {
156 156 "cell_type": "code",
157 "collapsed": true,
157 "collapsed": false,
158 158 "input": [
159 159 "x.svg"
160 160 ],
@@ -171,7 +171,7 b''
171 171 },
172 172 {
173 173 "cell_type": "code",
174 "collapsed": true,
174 "collapsed": false,
175 175 "input": [
176 176 "display(x.png)",
177 177 "display(x.svg)"
@@ -188,7 +188,7 b''
188 188 },
189 189 {
190 190 "cell_type": "code",
191 "collapsed": true,
191 "collapsed": false,
192 192 "input": [
193 193 "x2 = Gaussian(0.5, 0.2, 2000)",
194 194 "x2"
@@ -205,7 +205,7 b''
205 205 },
206 206 {
207 207 "cell_type": "code",
208 "collapsed": true,
208 "collapsed": false,
209 209 "input": [
210 210 "display(x.hist)",
211 211 "display(x2.hist)"
@@ -232,7 +232,7 b''
232 232 },
233 233 {
234 234 "cell_type": "code",
235 "collapsed": true,
235 "collapsed": false,
236 236 "input": [
237 237 "p = np.polynomial.Polynomial([1,2,3], [-10, 10])",
238 238 "p"
@@ -268,12 +268,11 b''
268 268 " terms.append(term)",
269 269 " px = '$P(x)=%s$' % '+'.join(terms)",
270 270 " dom = r', domain: $[%.2g,\\ %.2g]$' % tuple(p.domain)",
271 " win = r', window: $[%.2g,\\ %.2g]$' % tuple(p.window)",
272 " return px+dom+win"
271 " return px+dom"
273 272 ],
274 273 "language": "python",
275 274 "outputs": [],
276 "prompt_number": 9
275 "prompt_number": 11
277 276 },
278 277 {
279 278 "cell_type": "markdown",
@@ -283,13 +282,13 b''
283 282 },
284 283 {
285 284 "cell_type": "code",
286 "collapsed": true,
285 "collapsed": false,
287 286 "input": [
288 287 "poly2latex(p)"
289 288 ],
290 289 "language": "python",
291 290 "outputs": [],
292 "prompt_number": 10
291 "prompt_number": 12
293 292 },
294 293 {
295 294 "cell_type": "markdown",
@@ -301,14 +300,14 b''
301 300 },
302 301 {
303 302 "cell_type": "code",
304 "collapsed": true,
303 "collapsed": false,
305 304 "input": [
306 305 "from IPython.core.display import Math",
307 306 "Math(poly2latex(p))"
308 307 ],
309 308 "language": "python",
310 309 "outputs": [],
311 "prompt_number": 11
310 "prompt_number": 13
312 311 },
313 312 {
314 313 "cell_type": "markdown",
@@ -330,7 +329,7 b''
330 329 ],
331 330 "language": "python",
332 331 "outputs": [],
333 "prompt_number": 12
332 "prompt_number": 14
334 333 },
335 334 {
336 335 "cell_type": "markdown",
@@ -346,24 +345,24 b''
346 345 },
347 346 {
348 347 "cell_type": "code",
349 "collapsed": true,
348 "collapsed": false,
350 349 "input": [
351 350 "p"
352 351 ],
353 352 "language": "python",
354 353 "outputs": [],
355 "prompt_number": 13
354 "prompt_number": 15
356 355 },
357 356 {
358 357 "cell_type": "code",
359 "collapsed": true,
358 "collapsed": false,
360 359 "input": [
361 360 "p2 = np.polynomial.Polynomial([-20, 71, -15, 1])",
362 361 "p2"
363 362 ],
364 363 "language": "python",
365 364 "outputs": [],
366 "prompt_number": 14
365 "prompt_number": 16
367 366 },
368 367 {
369 368 "cell_type": "code",
General Comments 0
You need to be logged in to leave comments. Login now