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
0b3f44eb
Commit
0b3f44eb
authored
Nov 01, 2017
by
Unknown
Committed by
Jason Rhinelander
Nov 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trivial typos
Non-user facing. Found using `codespell -q 3`
parent
5c7a290d
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
10 deletions
+10
-10
docs/advanced/cast/eigen.rst
+3
-3
docs/advanced/functions.rst
+1
-1
include/pybind11/detail/common.h
+1
-1
setup.cfg
+1
-1
tests/test_factory_constructors.cpp
+1
-1
tests/test_virtual_functions.cpp
+1
-1
tests/test_virtual_functions.py
+1
-1
tools/check-style.sh
+1
-1
No files found.
docs/advanced/cast/eigen.rst
View file @
0b3f44eb
...
@@ -41,7 +41,7 @@ consideration: by default, numpy matrices and eigen matrices are *not* storage
...
@@ -41,7 +41,7 @@ consideration: by default, numpy matrices and eigen 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.
passing an array of integers to an Eigen param
a
ter requiring doubles, or
passing an array of integers to an Eigen param
e
ter requiring doubles, or
because the storage is incompatible), pybind11 makes a temporary copy and
because the storage is incompatible), pybind11 makes a temporary copy and
passes the copy instead.
passes the copy instead.
...
@@ -89,7 +89,7 @@ as dictated by the binding function's return value policy (see the
...
@@ -89,7 +89,7 @@ as dictated by the binding function's return value policy (see the
documentation on :ref:`return_value_policies` for full details). That means,
documentation on :ref:`return_value_policies` for full details). That means,
without an explicit return value policy, lvalue references will be copied and
without an explicit return value policy, lvalue references will be copied and
pointers will be managed by pybind11. In order to avoid copying, you should
pointers will be managed by pybind11. In order to avoid copying, you should
explictly specify an appropriate return value policy, as in the following
explic
i
tly specify an appropriate return value policy, as in the following
example:
example:
.. code-block:: cpp
.. code-block:: cpp
...
@@ -287,7 +287,7 @@ On the other hand, pybind11 allows you to pass 1-dimensional arrays of length N
...
@@ -287,7 +287,7 @@ On the other hand, pybind11 allows you to pass 1-dimensional arrays of length N
as Eigen parameters. If the Eigen type can hold a column vector of length N it
as Eigen parameters. If the Eigen type can hold a column vector of length N it
will be passed as such a column vector. If not, but the Eigen type constraints
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 prece
n
dence 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
expicitly 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.
...
...
docs/advanced/functions.rst
View file @
0b3f44eb
...
@@ -473,7 +473,7 @@ Overload resolution order
...
@@ -473,7 +473,7 @@ Overload resolution order
When a function or method with multiple overloads is called from Python,
When a function or method with multiple overloads is called from Python,
pybind11 determines which overload to call in two passes. The first pass
pybind11 determines which overload to call in two passes. The first pass
attempts to call each overload without allowing argument conversion (as if
attempts to call each overload without allowing argument conversion (as if
every argument had been specified as ``py::arg().noconvert()`` as decribed
every argument had been specified as ``py::arg().noconvert()`` as de
s
cribed
above).
above).
If no overload succeeds in the no-conversion first pass, a second pass is
If no overload succeeds in the no-conversion first pass, a second pass is
...
...
include/pybind11/detail/common.h
View file @
0b3f44eb
...
@@ -471,7 +471,7 @@ template <size_t... IPrev, size_t I, bool B, bool... Bs> struct select_indices_i
...
@@ -471,7 +471,7 @@ template <size_t... IPrev, size_t I, bool B, bool... Bs> struct select_indices_i
:
select_indices_impl
<
conditional_t
<
B
,
index_sequence
<
IPrev
...,
I
>
,
index_sequence
<
IPrev
...
>>
,
I
+
1
,
Bs
...
>
{};
:
select_indices_impl
<
conditional_t
<
B
,
index_sequence
<
IPrev
...,
I
>
,
index_sequence
<
IPrev
...
>>
,
I
+
1
,
Bs
...
>
{};
template
<
bool
...
Bs
>
using
select_indices
=
typename
select_indices_impl
<
index_sequence
<>
,
0
,
Bs
...
>::
type
;
template
<
bool
...
Bs
>
using
select_indices
=
typename
select_indices_impl
<
index_sequence
<>
,
0
,
Bs
...
>::
type
;
/// Backports of std::bool_constant and std::negation to accomodate older compilers
/// Backports of std::bool_constant and std::negation to accom
m
odate older compilers
template
<
bool
B
>
using
bool_constant
=
std
::
integral_constant
<
bool
,
B
>
;
template
<
bool
B
>
using
bool_constant
=
std
::
integral_constant
<
bool
,
B
>
;
template
<
typename
T
>
struct
negation
:
bool_constant
<!
T
::
value
>
{
};
template
<
typename
T
>
struct
negation
:
bool_constant
<!
T
::
value
>
{
};
...
...
setup.cfg
View file @
0b3f44eb
...
@@ -6,5 +6,5 @@ max-line-length = 99
...
@@ -6,5 +6,5 @@ max-line-length = 99
show_source = True
show_source = True
exclude = .git, __pycache__, build, dist, docs, tools, venv
exclude = .git, __pycache__, build, dist, docs, tools, venv
ignore =
ignore =
# required for pretty matrix formating: multiple spaces after `,` and `[`
# required for pretty matrix format
t
ing: multiple spaces after `,` and `[`
E201, E241
E201, E241
tests/test_factory_constructors.cpp
View file @
0b3f44eb
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
#include <cmath>
#include <cmath>
// Classes for testing python construction via C++ factory function:
// Classes for testing python construction via C++ factory function:
// Not public
al
ly constructible, copyable, or movable:
// Not publicly constructible, copyable, or movable:
class
TestFactory1
{
class
TestFactory1
{
friend
class
TestFactoryHelper
;
friend
class
TestFactoryHelper
;
TestFactory1
()
:
value
(
"(empty)"
)
{
print_default_created
(
this
);
}
TestFactory1
()
:
value
(
"(empty)"
)
{
print_default_created
(
this
);
}
...
...
tests/test_virtual_functions.cpp
View file @
0b3f44eb
...
@@ -249,7 +249,7 @@ TEST_SUBMODULE(virtual_functions, m) {
...
@@ -249,7 +249,7 @@ TEST_SUBMODULE(virtual_functions, m) {
m
.
def
(
"dispatch_issue_go"
,
[](
const
Base
*
b
)
{
return
b
->
dispatch
();
});
m
.
def
(
"dispatch_issue_go"
,
[](
const
Base
*
b
)
{
return
b
->
dispatch
();
});
// test_override_ref
// test_override_ref
// #392/397: overrid
d
ing reference-returning functions
// #392/397: overriding reference-returning functions
class
OverrideTest
{
class
OverrideTest
{
public
:
public
:
struct
A
{
std
::
string
value
=
"hi"
;
};
struct
A
{
std
::
string
value
=
"hi"
;
};
...
...
tests/test_virtual_functions.py
View file @
0b3f44eb
...
@@ -227,7 +227,7 @@ def test_dispatch_issue(msg):
...
@@ -227,7 +227,7 @@ def test_dispatch_issue(msg):
def
test_override_ref
():
def
test_override_ref
():
"""#392/397: overrid
d
ing reference-returning functions"""
"""#392/397: overriding reference-returning functions"""
o
=
m
.
OverrideTest
(
"asdf"
)
o
=
m
.
OverrideTest
(
"asdf"
)
# Not allowed (see associated .cpp comment)
# Not allowed (see associated .cpp comment)
...
...
tools/check-style.sh
View file @
0b3f44eb
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
# 4. missing space between keyword and parenthesis, e.g.: for(, if(, while(
# 4. missing space between keyword and parenthesis, e.g.: for(, if(, while(
# 5. Missing space between right parenthesis and brace, e.g. 'for (...){'
# 5. Missing space between right parenthesis and brace, e.g. 'for (...){'
# 6. opening brace on its own line. It should always be on the same line as the
# 6. opening brace on its own line. It should always be on the same line as the
# if/while/for/do statment.
# if/while/for/do stat
e
ment.
#
#
# Invoke as: tools/check-style.sh
# Invoke as: tools/check-style.sh
#
#
...
...
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