Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xavier Thompson
cython
Commits
75a20990
Commit
75a20990
authored
Mar 25, 2018
by
gabrieldemarmiesse
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrected some sentences.
parent
3a6fbe0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
docs/src/reference/compilation.rst
docs/src/reference/compilation.rst
+10
-5
No files found.
docs/src/reference/compilation.rst
View file @
75a20990
...
...
@@ -437,7 +437,7 @@ Compiling with a Jupyter Notebook
It's possible to compile code in a notebook cell with Cython.
For this you need to load the Cython magic::
%load_ext
C
ython
%load_ext
c
ython
Then you can define a Cython cell by writing ``%%cython`` on top of it.
Like this::
...
...
@@ -449,12 +449,17 @@ Like this::
a += i
print(a)
Note that each cell will be compiled in
dividually
. So if you use a package in a Cython
Note that each cell will be compiled in
to a separate extension module
. So if you use a package in a Cython
cell, you will have to import this package in the same cell. It's not enough to
have imported the package in a previous cell. Cython will tell you
about it at
compilation time if you don't comply.
have imported the package in a previous cell. Cython will tell you
that there are
"undefined global names" at
compilation time if you don't comply.
Additional allowable arguments to the Cython magic are:
The global names (top level functions, classes, variables and modules) of the
cell are then loaded into the global namespace of the notebook. So in the
end, it behaves as if you executed a Python cell.
Additional allowable arguments to the Cython magic are listed below.
You can see them also by typing ```%%cython?`` in IPython or a Jupyter notebook.
============================================ =======================================================================================================================================
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment