Skip to content

Commit 8379d25

Browse files
henryiiiCopilot
andcommitted
Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent e5e6522 commit 8379d25

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/advanced/pycpp/numpy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ them mapping to respective C++ counterparts.
261261

262262
.. note::
263263

264-
This is a strict type, it will only allows to specify NumPy type as input
264+
This is a strict type, it will only allow to specify NumPy type as input
265265
arguments, and does not allow other types of input parameters (e.g.,
266266
``py::numpy_scalar<int64_t>`` will not accept Python's builtin ``int`` ).
267267

include/pybind11/numpy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -811,7 +811,7 @@ struct numpy_scalar {
811811
numpy_scalar() = default;
812812
explicit numpy_scalar(value_type value) : value(value) {}
813813

814-
explicit operator value_type() { return value; }
814+
explicit operator value_type() const { return value; }
815815
numpy_scalar &operator=(value_type value) {
816816
this->value = value;
817817
return *this;

0 commit comments

Comments
 (0)