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
Boxiang Sun
cython
Commits
20de42c5
Commit
20de42c5
authored
Feb 01, 2013
by
Yury V. Zaytsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix various typos in the documentation
parent
cc511a3d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
20 deletions
+20
-20
docs/src/tutorial/caveats.rst
docs/src/tutorial/caveats.rst
+4
-4
docs/src/tutorial/numpy.rst
docs/src/tutorial/numpy.rst
+1
-1
docs/src/tutorial/profiling_tutorial.rst
docs/src/tutorial/profiling_tutorial.rst
+4
-4
docs/src/userguide/pyrex_differences.rst
docs/src/userguide/pyrex_differences.rst
+10
-10
docs/src/userguide/tutorial.rst
docs/src/userguide/tutorial.rst
+1
-1
No files found.
docs/src/tutorial/caveats.rst
View file @
20de42c5
...
...
@@ -8,12 +8,12 @@ for Python users, so this list may change in the future.
- ``10**-2 == 0``, instead of ``0.01`` like in Python.
- Given two typed ``int`` variables ``a`` and ``b``, ``a % b`` has the
same sign as the second argument (following Python semantics) rather than
having the same sign as the first (as in C). The C behavior can be
obtained, at some speed gain, by enabling the division directive
.
(
Versions prior to Cython 0.12. always followed C semantics.)
having the same sign as the first (as in C). The C behavior can be
obtained, at some speed gain, by enabling the division directive
(
versions prior to Cython 0.12 always followed C semantics).
- Care is needed with unsigned types. ``cdef unsigned n = 10;
print(range(-n, n))`` will print an empty list, since ``-n`` wraps
around to a large positive integer prior to being passed to the
``range`` function.
- Python's ``float`` type actually wraps C ``double`` values, and
Python's ``int`` type wraps C ``long`` values.
Python's ``int`` type wraps C ``long`` values.
docs/src/tutorial/numpy.rst
View file @
20de42c5
...
...
@@ -308,6 +308,6 @@ if someone is interested also under Python 2.x.
There is some speed penalty to this though (as one makes more assumptions
compile-time if the type is set to :obj:`np.ndarray`, specifically it is
assumed that the data is stored in pure strided mo
r
e and not in indirect
assumed that the data is stored in pure strided mo
d
e and not in indirect
mode).
docs/src/tutorial/profiling_tutorial.rst
View file @
20de42c5
...
...
@@ -18,13 +18,13 @@ Cython Profiling Basics
=======================
Profiling in Cython is controlled by a compiler directive.
It can
either be set either for an entire file or on a per function
It can
be set either for an entire file or on a per function basis
via a Cython decorator.
Enabl
e
profiling for a complete source file
-------------------------------------------
Enabl
ing
profiling for a complete source file
-------------------------------------------
--
Profiling is enable for a complete source file via a global directive to the
Profiling is enable
d
for a complete source file via a global directive to the
Cython compiler at the top of a file::
# cython: profile=True
...
...
docs/src/userguide/pyrex_differences.rst
View file @
20de42c5
...
...
@@ -16,20 +16,20 @@ Differences between Cython and Pyrex
and complete as Python as reasonable.
Python 3
.0
Support
================
==
Python 3 Support
================
Cython creates ``.c`` files that can be built and used with both
Python 2.x and Python 3.x. In fact, compiling your module with
Cython may very well be the easiest way to port code to Python 3.
0.
We are also working to make the compiler run in both Python 2.x and 3.
0.
Cython creates ``.c`` files that can be built and used with both
Python 2.x and Python 3.x. In fact, compiling your module with
Cython may very well be the easiest way to port code to Python 3.
We are also working to make the compiler run in both Python 2.x and 3.
x.
Many Python 3 constructs are already supported by Cython.
Many Python 3 constructs are already supported by Cython.
List/Set/Dict Comprehensions
----------------------------
Cython supports the different comprehensions defined by Python 3
.0
for
Cython supports the different comprehensions defined by Python 3 for
lists, sets and dicts::
[expr(x) for x in A] # list
...
...
@@ -68,7 +68,7 @@ takes exactly two positional parameters and has two required keyword parameters.
Conditional expressions "x if b else y" (
p
ython 2.5)
Conditional expressions "x if b else y" (
P
ython 2.5)
=====================================================
Conditional expressions as described in
...
...
@@ -76,7 +76,7 @@ http://www.python.org/dev/peps/pep-0308/::
X if C else Y
Only one of ``X`` and ``Y`` is evaluated
, (depending on the value of C).
Only one of ``X`` and ``Y`` is evaluated
(depending on the value of C).
.. _inline:
...
...
docs/src/userguide/tutorial.rst
View file @
20de42c5
...
...
@@ -63,7 +63,7 @@ interpreter and simply import it as if it was a regular python module::
>>> import helloworld
Hello World
Congratulations! You now know how to build a Cython extension. But
So F
ar
Congratulations! You now know how to build a Cython extension. But
so f
ar
this example doesn't really give a feeling why one would ever want to use Cython, so
lets create a more realistic example.
...
...
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