We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04f80b1 commit fedf9afCopy full SHA for fedf9af
1 file changed
docs/advanced/pycpp/numpy.rst
@@ -234,6 +234,13 @@ them mapping to respective C++ counterparts.
234
NumPy type and nothing else (e.g., ``py::numpy_scalar<int64_t>`` will not
235
accept built-in ``int`` or any other type for that matter).
236
237
+.. note::
238
+
239
+ Native C types are mapped to NumPy types in a platform specific way: for
240
+ instance, ``char`` may be mapped to either ``np.int8`` or ``np.uint8``
241
+ depending on the platform. If you want to ensure specific NumPy types,
242
+ it is recommended to use fixed-width aliases from ``<cstdint>>``.
243
244
Vectorizing functions
245
=====================
246
0 commit comments