mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 06:35:12 +00:00
Minor fixes (#613)
* Minor doc syntax fix The numpy documentation had a bad :file: reference (was using double backticks instead of single backticks). * Changed long-outdated "example" -> "tests" wording The ConstructorStats internal docs still had "from example import", and the main testing cpp file still used "example" in the module description.
This commit is contained in:
parent
ab60bf1346
commit
12494525cf
@ -155,7 +155,7 @@ NumPy array containing double precision values.
|
||||
When it is invoked with a different type (e.g. an integer or a list of
|
||||
integers), the binding code will attempt to cast the input into a NumPy array
|
||||
of the requested type. Note that this feature requires the
|
||||
:file:``pybind11/numpy.h`` header to be included.
|
||||
:file:`pybind11/numpy.h` header to be included.
|
||||
|
||||
Data in NumPy arrays is not guaranteed to packed in a dense manner;
|
||||
furthermore, entries can be separated by arbitrary column and row strides.
|
||||
|
@ -24,7 +24,7 @@ function calls to constructors:
|
||||
...
|
||||
}
|
||||
|
||||
You can find various examples of these in several of the existing example .cpp files. (Of course
|
||||
You can find various examples of these in several of the existing testing .cpp files. (Of course
|
||||
you don't need to add any of the above constructors/operators that you don't actually have, except
|
||||
for the destructor).
|
||||
|
||||
@ -41,7 +41,7 @@ value constructor) for all of the above methods which will be included in the ou
|
||||
For testing, each of these also keeps track the created instances and allows you to check how many
|
||||
of the various constructors have been invoked from the Python side via code such as:
|
||||
|
||||
from example import ConstructorStats
|
||||
from pybind11_tests import ConstructorStats
|
||||
cstats = ConstructorStats.get(MyClass)
|
||||
print(cstats.alive())
|
||||
print(cstats.default_constructions)
|
||||
|
@ -32,7 +32,7 @@ void bind_ConstructorStats(py::module &m) {
|
||||
}
|
||||
|
||||
PYBIND11_PLUGIN(pybind11_tests) {
|
||||
py::module m("pybind11_tests", "pybind example plugin");
|
||||
py::module m("pybind11_tests", "pybind testing plugin");
|
||||
|
||||
bind_ConstructorStats(m);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user