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

[doc] Fix some typos in our document export_results.rst #1312

Merged
merged 3 commits into from
Jun 25, 2020

Conversation

Rullec
Copy link
Contributor

@Rullec Rullec commented Jun 23, 2020

Fix some typos in the doc export_results.rst as @archibate mentioned.

@archibate
Copy link
Collaborator

Thanks, could you also fix the ones in offset.rst, where AssertionError should be TypeError?

@@ -102,20 +102,20 @@ Export videos
pixels[i, j, k] = ti.random() * 255

result_dir = "./results"
video_manger = ti.VideoManager(output_dir=result_dir, framerate=24, automatic_build=False)
video_manager = ti.VideoManager(output_dir=result_dir, framerate=24, automatic_build=False)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you also fix the one in examples/export_videos.py?

@Rullec
Copy link
Contributor Author

Rullec commented Jun 23, 2020

where AssertionError should be TypeError?

Umm, It seems just now I have responsed that problem here

IMO it's not a typo.

For example, If I say

import taichi as ti

ti.init()
c = ti.Matrix(2, 1, dt=ti.f32, shape=None, offset=(32,))             # AssertionError

then

[Taichi] mode=development
[Taichi] preparing sandbox at /tmp/taichi-60ypp77c
[Taichi] <dev mode>, supported archs: [cpu, cuda, opengl], commit 626afc81, python 3.6.10
Traceback (most recent call last):
  File "main.py", line 4, in <module>
    c = ti.Matrix(2, 1, dt=ti.f32, shape=None, offset=(32,))             # AssertionError
  File "/home/xudong/Projects/taichi/python/taichi/lang/matrix.py", line 127, in __init__
    assert offset is None, f"shape cannot be None when offset is being set"
AssertionError: shape cannot be None when offset is being set

It is AssertionError indeed. So the doc is correct, it matches the behavior.

Do you mean that TypeError is better than AssertionError

@Rullec Rullec requested a review from archibate June 23, 2020 14:17
@codecov
Copy link

codecov bot commented Jun 23, 2020

Codecov Report

Merging #1312 into master will increase coverage by 0.32%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1312      +/-   ##
==========================================
+ Coverage   66.36%   66.68%   +0.32%     
==========================================
  Files          36       36              
  Lines        5075     5094      +19     
  Branches      933      931       -2     
==========================================
+ Hits         3368     3397      +29     
+ Misses       1549     1539      -10     
  Partials      158      158              
Impacted Files Coverage Δ
python/taichi/lang/impl.py 90.06% <0.00%> (-0.14%) ⬇️
python/taichi/lang/__init__.py 75.35% <0.00%> (+0.35%) ⬆️
python/taichi/lang/matrix.py 90.67% <0.00%> (+0.50%) ⬆️
python/taichi/lang/expr.py 89.75% <0.00%> (+1.69%) ⬆️
python/taichi/lang/snode.py 86.02% <0.00%> (+8.68%) ⬆️

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 d9c9616...51a10ae. Read the comment docs.

@yuanming-hu yuanming-hu changed the title [doc] Fix some typo in our document export_results.rst [doc] Fix some typos in our document export_results.rst Jun 23, 2020
@Rullec
Copy link
Contributor Author

Rullec commented Jun 24, 2020

Thank @archibate for pointing out a typo in offset.rst, It has been fixed now.

Copy link
Collaborator

@archibate archibate left a comment

Choose a reason for hiding this comment

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

Thx!

@archibate archibate merged commit 9041851 into taichi-dev:master Jun 25, 2020
@yuanming-hu yuanming-hu mentioned this pull request Jun 28, 2020
@Rullec Rullec deleted the fix_typo_in_export_results_doc branch July 26, 2020 16:08
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.

2 participants