Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyopencl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Andreas Klöckner
pyopencl
Commits
72fd36d4
Commit
72fd36d4
authored
14 years ago
by
Andreas Klöckner
Browse files
Options
Downloads
Patches
Plain Diff
Slight tweaks to comment about in-memory format of images. (Christian Schilling)
parent
6c704b82
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/source/runtime.rst
+9
-3
9 additions, 3 deletions
doc/source/runtime.rst
with
9 additions
and
3 deletions
doc/source/runtime.rst
+
9
−
3
View file @
72fd36d4
...
@@ -403,9 +403,15 @@ Images
...
@@ -403,9 +403,15 @@ Images
.. note::
.. note::
If you want to load images from numpy arrays or read images back into arrays, be aware
If you want to load images from :mod:`numpy.ndarray` instances or read images
that numpy arrays are stored row-major by default whereas OpenCL expects them to be stored in
back into them, be aware that OpenCL images expect the *x* dimension to vary
column-major order.
fastest, whereas in the default (C) order of :mod:`numpy` arrays, the last index
varies fastest. If your array is arranged in the wrong order in memory,
there are two possible fixes for this:
* Convert the array to Fortran (column-major) order using :func:`numpy.asarray`.
* Pass *ary.T.copy()* to the image creation function.
.. versionadded:: 0.91
.. versionadded:: 0.91
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment