Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
09330b94
Commit
09330b94
authored
Jun 10, 2019
by
Darius Arnold
Committed by
Wenzel Jakob
Jun 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typos in documentation (#1635)
* Always capitalize Eigen * Fix spelling
parent
21bf16f5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
docs/advanced/cast/eigen.rst
+5
-5
No files found.
docs/advanced/cast/eigen.rst
View file @
09330b94
...
@@ -37,7 +37,7 @@ that maps into the source ``numpy.ndarray`` data: this requires both that the
...
@@ -37,7 +37,7 @@ that maps into the source ``numpy.ndarray`` data: this requires both that the
data types are the same (e.g. ``dtype='float64'`` and ``MatrixType::Scalar`` is
data types are the same (e.g. ``dtype='float64'`` and ``MatrixType::Scalar`` is
``double``); and that the storage is layout compatible. The latter limitation
``double``); and that the storage is layout compatible. The latter limitation
is discussed in detail in the section below, and requires careful
is discussed in detail in the section below, and requires careful
consideration: by default, numpy matrices and
e
igen matrices are *not* storage
consideration: by default, numpy matrices and
E
igen matrices are *not* storage
compatible.
compatible.
If the numpy matrix cannot be used as is (either because its types differ, e.g.
If the numpy matrix cannot be used as is (either because its types differ, e.g.
...
@@ -226,7 +226,7 @@ order.
...
@@ -226,7 +226,7 @@ order.
Failing rather than copying
Failing rather than copying
===========================
===========================
The default behaviour when binding ``Eigen::Ref<const MatrixType>``
e
igen
The default behaviour when binding ``Eigen::Ref<const MatrixType>``
E
igen
references is to copy matrix values when passed a numpy array that does not
references is to copy matrix values when passed a numpy array that does not
conform to the element type of ``MatrixType`` or does not have a compatible
conform to the element type of ``MatrixType`` or does not have a compatible
stride layout. If you want to explicitly avoid copying in such a case, you
stride layout. If you want to explicitly avoid copying in such a case, you
...
@@ -289,13 +289,13 @@ will be passed as such a column vector. If not, but the Eigen type constraints
...
@@ -289,13 +289,13 @@ will be passed as such a column vector. If not, but the Eigen type constraints
will accept a row vector, it will be passed as a row vector. (The column
will accept a row vector, it will be passed as a row vector. (The column
vector takes precedence when both are supported, for example, when passing a
vector takes precedence when both are supported, for example, when passing a
1D numpy array to a MatrixXd argument). Note that the type need not be
1D numpy array to a MatrixXd argument). Note that the type need not be
expicitly a vector: it is permitted to pass a 1D numpy array of size 5 to an
exp
l
icitly a vector: it is permitted to pass a 1D numpy array of size 5 to an
Eigen ``Matrix<double, Dynamic, 5>``: you would end up with a 1x5 Eigen matrix.
Eigen ``Matrix<double, Dynamic, 5>``: you would end up with a 1x5 Eigen matrix.
Passing the same to an ``Eigen::MatrixXd`` would result in a 5x1 Eigen matrix.
Passing the same to an ``Eigen::MatrixXd`` would result in a 5x1 Eigen matrix.
When returning an
e
igen vector to numpy, the conversion is ambiguous: a row
When returning an
E
igen vector to numpy, the conversion is ambiguous: a row
vector of length 4 could be returned as either a 1D array of length 4, or as a
vector of length 4 could be returned as either a 1D array of length 4, or as a
2D array of size 1x4. When encoutering such a situation, pybind11 compromises
2D array of size 1x4. When encou
n
tering such a situation, pybind11 compromises
by considering the returned Eigen type: if it is a compile-time vector--that
by considering the returned Eigen type: if it is a compile-time vector--that
is, the type has either the number of rows or columns set to 1 at compile
is, the type has either the number of rows or columns set to 1 at compile
time--pybind11 converts to a 1D numpy array when returning the value. For
time--pybind11 converts to a 1D numpy array when returning the value. For
...
...
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