Skip to content
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

[Lang] Deprecate element_dim and element_shape in ndarray annotations. #6665

Merged
merged 12 commits into from
Nov 21, 2022

Conversation

turbo0628
Copy link
Member

Issue: #6572

Changes:

  • Add deprecation warning when element_shape and element_dim are specified.
  • Internally remove element_shape and element_dim inside the type annotation. Added a helper function to create respective MatrixType in dtype for legacy code.
  • Add deprecation test.
  • Update docstring.

@netlify
Copy link

netlify bot commented Nov 18, 2022

Deploy Preview for docsite-preview ready!

Name Link
🔨 Latest commit b95ad7d
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/637a4938cb1e9b00082e100d
😎 Deploy Preview https://deploy-preview-6665--docsite-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@turbo0628 turbo0628 marked this pull request as ready for review November 18, 2022 09:10
@turbo0628 turbo0628 added the full-ci Run complete set of CI tests label Nov 18, 2022
Copy link
Contributor

@ailzhang ailzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome thanks!
Had a few suggestions inline to make the code more readable but otherwise LGTM!

python/taichi/aot/utils.py Outdated Show resolved Hide resolved
python/taichi/types/ndarray_type.py Outdated Show resolved Hide resolved
python/taichi/types/ndarray_type.py Show resolved Hide resolved
python/taichi/types/ndarray_type.py Outdated Show resolved Hide resolved
python/taichi/types/ndarray_type.py Show resolved Hide resolved
@turbo0628 turbo0628 merged commit 8328e1b into taichi-dev:master Nov 21, 2022
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
taichi-dev#6665)

Issue: taichi-dev#6572 

Changes:
* Add deprecation warning when `element_shape` and `element_dim` are
specified.
* Internally remove `element_shape` and `element_dim` inside the type
annotation. Added a helper function to create respective MatrixType in
dtype for legacy code.
* Add deprecation test.
* Update docstring.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Ailing  <ailzhang@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
full-ci Run complete set of CI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants