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] [refactor] Deprecate x.shape() and x.dim(), use x.shape instead #1318

Merged
merged 5 commits into from
Jun 26, 2020

Conversation

archibate
Copy link
Collaborator

@archibate archibate commented Jun 24, 2020

Related issue = #1214 (comment)

[Click here for the format server]


  • deprecate dim().
  • make shape() a @property.
  • document mat.n, mat.m in meta.rst.

Will we make data_type() and snode() as a @property as well?

@codecov
Copy link

codecov bot commented Jun 24, 2020

Codecov Report

Merging #1318 into master will increase coverage by 0.04%.
The diff coverage is 91.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1318      +/-   ##
==========================================
+ Coverage   85.48%   85.52%   +0.04%     
==========================================
  Files          19       19              
  Lines        3375     3385      +10     
  Branches      630      630              
==========================================
+ Hits         2885     2895      +10     
  Misses        358      358              
  Partials      132      132              
Impacted Files Coverage Δ
python/taichi/lang/transformer.py 93.63% <ø> (ø)
python/taichi/lang/matrix.py 90.70% <88.88%> (+0.03%) ⬆️
python/taichi/lang/expr.py 89.82% <91.66%> (ø)
python/taichi/lang/snode.py 87.12% <92.85%> (+1.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a434d3...7237812. Read the comment docs.

@archibate archibate requested a review from k-ye June 24, 2020 14:41
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

LGTM. Do you know if there are examples using shape() or dim()?

@k-ye k-ye changed the title [lang] [Refactor] Deprecate x.shape() and x.dim(), use x.shape instead [Lang] [refactor] Deprecate x.shape() and x.dim(), use x.shape instead Jun 25, 2020
@archibate archibate added the LGTM label Jun 25, 2020
@archibate archibate self-assigned this Jun 25, 2020
@archibate
Copy link
Collaborator Author

LGTM. Do you know if there are examples using shape() or dim()?

I grep'ed to find them out, all are removed now, thank for the reminder!

Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

Very nice. Thanks!

Will we make data_type() and snode() as a @property as well?

Let's talk about it later. data_type may be changed into dtype: #1181.

@archibate archibate merged commit 02e5ebd into taichi-dev:master Jun 26, 2020
@yuanming-hu yuanming-hu mentioned this pull request Jun 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants