Skip to content

Commit 5cc03bf

Browse files
committed
Fix bounds check
1 parent 2184f63 commit 5cc03bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/numpy_cpp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ class array_view : public detail::array_view_accessors<array_view, T, ND>
470470

471471
npy_intp dim(size_t i) const
472472
{
473-
if (i > ND) {
473+
if (i >= ND) {
474474
return 0;
475475
}
476476
return m_shape[i];

0 commit comments

Comments
 (0)