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
Kirill Smelkov
cython
Commits
c9e9efff
Commit
c9e9efff
authored
Nov 23, 2012
by
Lars Buitinck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
more clarification on memoryview example (indexing syntax)
parent
dae4c13b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
docs/src/userguide/memoryviews.rst
docs/src/userguide/memoryviews.rst
+3
-5
No files found.
docs/src/userguide/memoryviews.rst
View file @
c9e9efff
...
...
@@ -47,13 +47,11 @@ Quickstart
# Show the sum of all the arrays before altering it
print "Numpy sum of the Numpy array before assignments:", narr.sum()
# We can set the values in the C array etc using another memory view
# Ellipsis or
# We can copy the values from one memoryview into another using a single
# statement, by either indexing with ... or (NumPy-style) with a colon.
carr_view[...] = narr_view
# colon or
cyarr_view[:] = narr_view
#
multi-colon syntax for assignemt to the whole block of memory
#
NumPy-style syntax for assigning a single value to all elements.
narr_view[:, :, :] = 3
# Just to distinguish the arrays
...
...
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