-
Notifications
You must be signed in to change notification settings - Fork 654
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
[BugFix] Fix breaking behaviour in 0.18.0 #1801
[BugFix] Fix breaking behaviour in 0.18.0 #1801
Conversation
@@ -373,7 +373,7 @@ private int addIndexItem(String indexItem, int argIndex, Object[] args) { | |||
if (array.getDataType() == DataType.BOOLEAN) { | |||
indices.add(new NDIndexBooleans(array)); | |||
return argIndex + 1; | |||
} else if (array.getDataType().isInteger()) { | |||
} else { |
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.
Would this cause issues if DataType is UNKNOWN or STRING? https://github.com/deepjavalibrary/djl/blob/master/api/src/main/java/ai/djl/ndarray/types/DataType.java#L28-L34 seems like what we need to cover in this code, and not UNKNOWN or STRING
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.
Thanks for spotting this. I'll update it.
Codecov Report
@@ Coverage Diff @@
## master #1801 +/- ##
============================================
- Coverage 72.08% 69.60% -2.49%
- Complexity 5126 5493 +367
============================================
Files 473 524 +51
Lines 21970 24318 +2348
Branches 2351 2645 +294
============================================
+ Hits 15838 16927 +1089
- Misses 4925 6081 +1156
- Partials 1207 1310 +103
Continue to review full report at Codecov.
|
NDIndex tests of float index are also added.
Description
This fixes issue.
The fix is to allow other datatype of index than just integer. The dataType conversion to
Long
has already implemented before in JniUtils