Skip to content

Commit d068ab2

Browse files
authored
docs: pybind11/numpy.h does not require numpy at build time. (#2720)
This is nice enough to be mentioned explicitly in the docs.
1 parent 028812a commit d068ab2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/advanced/pycpp/numpy.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ NumPy array containing double precision values.
150150
151151
When it is invoked with a different type (e.g. an integer or a list of
152152
integers), the binding code will attempt to cast the input into a NumPy array
153-
of the requested type. Note that this feature requires the
154-
:file:`pybind11/numpy.h` header to be included.
153+
of the requested type. This feature requires the :file:`pybind11/numpy.h`
154+
header to be included. Note that :file:`pybind11/numpy.h` does not depend on
155+
the NumPy headers, and thus can be used without declaring a build-time
156+
dependency on NumPy; NumPy>=1.7.0 is a runtime dependency.
155157

156158
Data in NumPy arrays is not guaranteed to packed in a dense manner;
157159
furthermore, entries can be separated by arbitrary column and row strides.

0 commit comments

Comments
 (0)