Skip to content

Commit 18fe0c7

Browse files
committed
Allow passing multidimensional arrays that can be squeezed.
1 parent fbe9221 commit 18fe0c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python_bindings/bindings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class Index {
261261
py::array_t < size_t, py::array::c_style | py::array::forcecast > items(ids_);
262262
auto ids_numpy = items.request();
263263

264-
if (ids_numpy.ndim != 1) {
264+
if (ids_numpy.ndim == 0) {
265265
throw std::invalid_argument("get_items accepts a list of indices and returns a list of vectors");
266266
} else {
267267
std::vector<size_t> ids1(ids_numpy.shape[0]);

0 commit comments

Comments
 (0)