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

[API] Extend NumPy Array dtypes with int16, uint16, uint32, uint64 #20478

Merged
merged 11 commits into from
Sep 10, 2021

Conversation

barry-jin
Copy link
Contributor

@barry-jin barry-jin commented Jul 30, 2021

Description

As stated in array api standaization, array api should support bool, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float32, float64 data types.

This PR will extend MXNet NumPy array data type with int16, uint16, uint32, uint64, which are not supported in current design. Also, the following array creation functions will also update these data type support:
mx.np.arange, mx.np.empty, mx.np.empty_like, mx.np.eye, mx.np.full, mx.np.full_like, mx.np.ones, mx.np.ones_like
Type cast function:
arr.astype()

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

  • Add dtypes: int16, uint16, uint32, uint64
  • Update array creation functions
  • Add tests
  • Update manipulation functions and operators.

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 @barry-jin , 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: [website, unix-cpu, miscellaneous, windows-gpu, unix-gpu, sanity, centos-gpu, windows-cpu, centos-cpu, edge, clang]


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 the pr-work-in-progress PR is still work in progress label Jul 30, 2021
@barry-jin barry-jin changed the title [WIP][API] Extend NumPy Array dtypes with int16, uint16, uint32, uint64 [API] Extend NumPy Array dtypes with int16, uint16, uint32, uint64 Sep 8, 2021
@barry-jin barry-jin merged commit 17088c6 into apache:master Sep 10, 2021
@barry-jin barry-jin deleted the dtype-support branch September 10, 2021 01:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-work-in-progress PR is still work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants