FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

macro-calls · xtensor-stack/xtensor-python@9e2c33b · GitHub

Repository navigation

Commit 9e2c33b

Browse files
committed
macro-calls
1 parent d41c2c0 commit 9e2c33b

4 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎docs/source/basic_usage.rst‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Example 1: Use an algorithm of the C++ library on a numpy array inplace
2929
3030
PYBIND11_PLUGIN(xtensor_python_test)
3131
{
32-
import_numpy() //this is actually a macro
32+
import_numpy(); //this is actually a macro
3333
pybind11::module m("xtensor_python_test", "Test module for xtensor python bindings");
3434
3535
m.def("sum_of_sines", sum_of_sines,
@@ -80,7 +80,7 @@ Example 2: Create a universal function from a C++ scalar function
8080
8181
PYBIND11_PLUGIN(xtensor_python_test)
8282
{
83-
import_numpy()
83+
import_numpy();
8484
py::module m("xtensor_python_test", "Test module for xtensor python bindings");
8585
8686
m.def("vectorized_func", xt::pyvectorize(scalar_func), "");

‎docs/source/numpy_capi.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Thus the basic skeleton of the module looks like:
2929
3030
PYBIND11_PLUGIN(plugin_name)
3131
{
32-
import_numpy()
32+
import_numpy();
3333
pybind11::module m(//...
3434
//...
3535
return m.ptr();

‎test/main.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ int main(int argc, char* argv[])
2020
{
2121
// Initialize all the things (google-test and Python interpreter)
2222
Py_Initialize();
23-
import_numpy()
23+
import_numpy();
2424
::testing::InitGoogleTest(&argc, argv);
2525

2626
// Run test suite

‎test_python/main.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ int add(int i, int j)
5151

5252
PYBIND11_PLUGIN(xtensor_python_test)
5353
{
54-
import_numpy()
54+
import_numpy();
55+
5556
py::module m("xtensor_python_test", "Test module for xtensor python bindings");
5657

5758
m.def("example1", example1);

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL