From ba5fbed51746f3e22cdf99d8a4fef6f2c2f7258e Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 8 Dec 2020 21:50:29 +0100 Subject: [PATCH] pybind11/numpy.h does not require numpy at build time. This is nice enough to be mentioned explicitly in the docs. --- docs/advanced/pycpp/numpy.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/advanced/pycpp/numpy.rst b/docs/advanced/pycpp/numpy.rst index 19ed10b3bf..0a81aa8fd5 100644 --- a/docs/advanced/pycpp/numpy.rst +++ b/docs/advanced/pycpp/numpy.rst @@ -150,8 +150,10 @@ NumPy array containing double precision values. When it is invoked with a different type (e.g. an integer or a list of integers), the binding code will attempt to cast the input into a NumPy array -of the requested type. Note that this feature requires the -:file:`pybind11/numpy.h` header to be included. +of the requested type. This feature requires the :file:`pybind11/numpy.h` +header to be included. Note that :file:`pybind11/numpy.h` does not depend on +the NumPy headers, and thus can be used without declaring a build-time +dependency on NumPy; NumPy>=1.7.0 is a runtime dependency. Data in NumPy arrays is not guaranteed to packed in a dense manner; furthermore, entries can be separated by arbitrary column and row strides.