mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
Enable py::ellipsis on Python 2 (#2360)
* Enable py::ellipsis on Python 2 * Enable py::ellipsis tests on Python 2 and mention `Ellipsis` in the docs
This commit is contained in:
@@ -382,9 +382,7 @@ TEST_SUBMODULE(numpy_array, sm) {
|
||||
return a;
|
||||
});
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
sm.def("index_using_ellipsis", [](py::array a) {
|
||||
return a[py::make_tuple(0, py::ellipsis(), 0)];
|
||||
});
|
||||
#endif
|
||||
sm.def("index_using_ellipsis", [](py::array a) {
|
||||
return a[py::make_tuple(0, py::ellipsis(), 0)];
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user