We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be9b002 commit 2336655Copy full SHA for 2336655
keras/src/backend/openvino/core.py
@@ -341,8 +341,13 @@ def count_unsqueeze_before(dim):
341
raise ValueError(
342
"OpenVINO backend does not support boolean indexing"
343
)
344
- elif isinstance(index, (int, np.integer)):
345
- if isinstance(index, np.integer):
+ elif isinstance(index, (int, np.integer, np.ndarray)):
+ if isinstance(index, (np.ndarray, np.integer)):
346
+ if isinstance(index, np.ndarray):
347
+ assert len(index.shape) == 0, (
348
+ "OpenVINO backend does not "
349
+ "support multi-dimensional indexing"
350
+ )
351
index = int(index)
352
actual_dim = dim - count_unsqueeze_before(dim)
353
if not (0 <= actual_dim < rank):
0 commit comments