File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ simply using ``vectorize``).
261
261
namespace py = pybind11;
262
262
263
263
py::array_t<double> add_arrays(py::array_t<double> input1, py::array_t<double> input2) {
264
- auto buf1 = input1.request(), buf2 = input2.request();
264
+ py::buffer_info buf1 = input1.request(), buf2 = input2.request();
265
265
266
266
if (buf1.ndim != 1 || buf2.ndim != 1)
267
267
throw std::runtime_error("Number of dimensions must be one");
@@ -272,7 +272,7 @@ simply using ``vectorize``).
272
272
/* No pointer is passed, so NumPy will allocate the buffer */
273
273
auto result = py::array_t<double>(buf1.size);
274
274
275
- auto buf3 = result.request();
275
+ py::buffer_info buf3 = result.request();
276
276
277
277
double *ptr1 = (double *) buf1.ptr,
278
278
*ptr2 = (double *) buf2.ptr,
You can’t perform that action at this time.
0 commit comments