-
Notifications
You must be signed in to change notification settings - Fork 19.6k
update a small feature in __getitem__ for openvino backend #21407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #21407 +/- ##
==========================================
- Coverage 82.72% 82.72% -0.01%
==========================================
Files 565 565
Lines 55219 55221 +2
Branches 8608 8609 +1
==========================================
Hits 45682 45682
- Misses 7427 7429 +2
Partials 2110 2110
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
keras/src/backend/openvino/core.py
Outdated
elif isinstance(index, (int, np.integer, np.ndarray)): | ||
if isinstance(index, (np.ndarray, np.integer)): | ||
if isinstance(index, np.ndarray): | ||
assert len(index.shape) == 0, ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use ValueError instead of assert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fchollet
Done!
2336655
to
0466f3b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fchollet, looks good to me. Recommend to merge
Hi @fchollet
I just added a check for
np.ndarray
in the function that was recently merged.