You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
435 B
30 lines
435 B
4 years ago
|
from ..nbbase import (
|
||
|
NotebookNode,
|
||
|
new_code_cell, new_text_cell, new_notebook
|
||
|
)
|
||
|
|
||
|
|
||
|
|
||
|
nb0 = new_notebook()
|
||
|
|
||
|
nb0.cells.append(new_text_cell(
|
||
|
text='Some NumPy Examples'
|
||
|
))
|
||
|
|
||
|
|
||
|
nb0.cells.append(new_code_cell(
|
||
|
code='import numpy',
|
||
|
prompt_number=1
|
||
|
))
|
||
|
|
||
|
nb0.cells.append(new_code_cell(
|
||
|
code='a = numpy.random.rand(100)',
|
||
|
prompt_number=2
|
||
|
))
|
||
|
|
||
|
nb0.cells.append(new_code_cell(
|
||
|
code='print a',
|
||
|
prompt_number=3
|
||
|
))
|
||
|
|