diff --git a/include/pybind11/numpy.h b/include/pybind11/numpy.h index 6ed365413..cb46a871a 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -215,8 +215,8 @@ struct vectorize_helper { strides[i - 1] = strides[i] * shape[i]; size *= shape[i]; } + size *= shape[0]; } - size *= shape[0]; if (size == 1) return cast(f(*((Args *) buffers[Index].ptr)...));