From 7e8ece8f3dfb3c6e5f28cdff66e65e6e62ca629a Mon Sep 17 00:00:00 2001 From: Johan Mabille Date: Thu, 11 Feb 2016 18:42:22 +0100 Subject: [PATCH] Crash for scalar inputs fixed --- include/pybind11/numpy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)...));