mozga-intel opened a new pull request #20532:
URL: https://github.com/apache/incubator-mxnet/pull/20532


   ## Description ##
   There is an axis param that is set up in a loop: [loop] Loop control 
variable 'axis' not used within the loop body but it's only used out of the 
loop scope: 
[loop](https://github.com/apache/incubator-mxnet/blob/master/tests/python/unittest/test_operator.py#L4183)
   ```python
       for axis in range(-data_ndim, data_ndim):
           data_shape = ()
           for _ in range(data_ndim):
               data_shape += (np.random.randint(low=1, high=5), )
           idx_shape = ()
           for _ in range(idx_ndim):
               idx_shape += (np.random.randint(low=1, high=5), )
        ....
       
       result = mx.sym.take(a=data, indices=idx, axis=axis, mode=mode)
   ```
   The axis is always equal to `data_ndim- 1`.  Following the documentation 
[doc](https://mxnet.apache.org/versions/1.6/api/r/docs/api/mx.nd.take.html), 
the axis of an input array is to be taken. For the input tensor of rank r, it 
could be in the range of [-r, r-1]. Where r = data_ndim;
   
   ## Checklist ##
   ### Essentials ###
   - [ ] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], 
[FEATURE], [DOC], etc)
   - [ ] Changes are complete (i.e. I finished coding on this PR)
   - [ ] All changes have test coverage
   - [ ] Code is well-documented
   
   ### Changes ###
   - [ ] Feature1, tests, (and when applicable, API doc)
   - [ ] Feature2, tests, (and when applicable, API doc)
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be 
made.
   - Interesting edge cases to note here
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to