Skip to content

Commit

Permalink
Inconsistent comments between 2 templates of unchecked(). (#4519)
Browse files Browse the repository at this point in the history
This comment is unrelated to having T in tparam or not.
Probably a typo.
Copied the correct one here.

Resolve #4518
  • Loading branch information
xkszltl authored Feb 20, 2023
1 parent 68211d4 commit a19daea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/pybind11/numpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -1121,10 +1121,10 @@ class array_t : public array {

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

0 comments on commit a19daea

Please sign in to comment.