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
Gwenaël Samain
cython
Commits
cbdca7c2
Commit
cbdca7c2
authored
Jun 20, 2018
by
scoder
Committed by
GitHub
Jun 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2377 from gabrieldemarmiesse/test_string_3
Adding tests for "Unicode and passing strings" part 3
parents
285ca063
da537165
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
7 deletions
+6
-7
docs/examples/tutorial/string/arg_memview.pyx
docs/examples/tutorial/string/arg_memview.pyx
+5
-0
docs/src/tutorial/strings.rst
docs/src/tutorial/strings.rst
+1
-7
No files found.
docs/examples/tutorial/string/arg_memview.pyx
0 → 100644
View file @
cbdca7c2
def
process_byte_data
(
unsigned
char
[:]
data
):
length
=
data
.
shape
[
0
]
first_byte
=
data
[
0
]
slice_view
=
data
[
1
:
-
1
]
# ...
docs/src/tutorial/strings.rst
View file @
cbdca7c2
...
@@ -202,13 +202,7 @@ of byte containers, e.g. :obj:`bytearray` objects or memory views.
...
@@ -202,13 +202,7 @@ of byte containers, e.g. :obj:`bytearray` objects or memory views.
Depending on how (and where) the data is being processed, it may be a
Depending on how (and where) the data is being processed, it may be a
good idea to instead receive a 1-dimensional memory view, e.g.
good idea to instead receive a 1-dimensional memory view, e.g.
::
.. literalinclude:: ../../examples/tutorial/string/arg_memview.pyx
def process_byte_data(unsigned char[:] data):
length = data.shape[0]
first_byte = data[0]
slice_view = data[1:-1]
...
Cython's memory views are described in more detail in
Cython's memory views are described in more detail in
:doc:`../userguide/memoryviews`, but the above example already shows
:doc:`../userguide/memoryviews`, but the above example already shows
...
...
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