Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Enable other axes support: the take test #20532

Conversation

mozga-intel
Copy link
Contributor

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

    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, 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

@mxnet-bot
Copy link

Hey @mozga-intel , Thanks for submitting the PR
All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands:

  • To trigger all jobs: @mxnet-bot run ci [all]
  • To trigger specific jobs: @mxnet-bot run ci [job1, job2]

CI supported jobs: [windows-cpu, unix-cpu, edge, unix-gpu, miscellaneous, clang, windows-gpu, website, centos-gpu, sanity, centos-cpu]


Note:
Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin.
All CI tests must pass before the PR can be merged.

@mseth10 mseth10 added pr-awaiting-testing PR is reviewed and waiting CI build and test pr-awaiting-review PR is waiting for code review and removed pr-awaiting-testing PR is reviewed and waiting CI build and test labels Aug 17, 2021
@akarbown akarbown merged commit 9a4dcf4 into apache:master Aug 19, 2021
KexinFeng pushed a commit to KexinFeng/incubator-mxnet that referenced this pull request Aug 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants