Skip to content

Commit a19daea

Browse files
authored
Inconsistent comments between 2 templates of unchecked(). (#4519)
This comment is unrelated to having T in tparam or not. Probably a typo. Copied the correct one here. Resolve #4518
1 parent 68211d4 commit a19daea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/pybind11/numpy.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -1121,10 +1121,10 @@ class array_t : public array {
11211121

11221122
/**
11231123
* Returns a proxy object that provides const access to the array's data without bounds or
1124-
* dimensionality checking. Unlike `unchecked()`, this does not require that the underlying
1125-
* array have the `writable` flag. Use with care: the array must not be destroyed or reshaped
1126-
* for the duration of the returned object, and the caller must take care not to access invalid
1127-
* dimensions or dimension indices.
1124+
* dimensionality checking. Unlike `mutable_unchecked()`, this does not require that the
1125+
* underlying array have the `writable` flag. Use with care: the array must not be destroyed
1126+
* or reshaped for the duration of the returned object, and the caller must take care not to
1127+
* access invalid dimensions or dimension indices.
11281128
*/
11291129
template <ssize_t Dims = -1>
11301130
detail::unchecked_reference<T, Dims> unchecked() const & {

0 commit comments

Comments
 (0)