-
Notifications
You must be signed in to change notification settings - Fork 6.8k
[Backport] Fix for test_ndarray.test_order failing on CI (v1.3.x) #12725
Conversation
@@ -819,9 +831,9 @@ def get_large_matrix(): | |||
# Repeat those tests that don't involve indices. These should pass even with | |||
# duplicated input data values (over many repeated runs with different random seeds, | |||
# this will be tested). | |||
for dtype in [np.int16, np.int32, np.int64, np.float32, np.float64]: | |||
for dtype in [ np.int32, np.int64, np.float32, np.float64]: |
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.
You have a formatting glitch - whitespace after opening square bracket
You have a typo in the title ;) I suggest for the title: |
@ankkhedia strange, I see your commit, but not the fix in the main diff. |
@mxnet-label-bot [pr-awaiting-merge] |
@mxnet-label-bot [pr-awaiting-testing] |
@lebeg Could you please take a look now. So, there were two places with that formatting glitch, one was fixed while other was looked over in previous commit. |
@lebeg ping! |
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.
Sorry, for late response, lgtm
@sandeep-krishnamurthy Could you please review and merge this PR if it looks good. |
Description
Backporting fix for flaky test: test_ndarray.test_order from master as the test failed in CI. Tracked in #12310
The test uses np.int16 which is not a supported dtype for ndarray.
Also, conversion of np array to ndarray defaults to float32 in destination ndarray even though the dtype of source could be anything leading to failure of unites due to loss of precision in some cases.
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
--> Removed tests for np.int16
--> Instead of using default dtype for converting arrays , used the type from source array to convert to target array.