From 918892b97e21a4feca42cd5501c98c5b3aa8bb3f Mon Sep 17 00:00:00 2001 From: Maarten Baert Date: Tue, 7 Jun 2022 01:41:38 +0200 Subject: [PATCH] Make dtype::num() return type consistent with other functions (#3995) --- 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 b8ba2259f..0c77a98dd 100644 --- a/include/pybind11/numpy.h +++ b/include/pybind11/numpy.h @@ -604,7 +604,7 @@ public: } /// type number of dtype. - ssize_t num() const { + int num() const { // Note: The signature, `dtype::num` follows the naming of NumPy's public // Python API (i.e., ``dtype.num``), rather than its internal // C API (``PyArray_Descr::type_num``).