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] Guard values with "ti.approx" in "docs/write_test.rst" to allow FP-error tolerance #1911

Merged
merged 7 commits into from
Oct 3, 2020

Conversation

new-TonyWang
Copy link
Contributor

Some of the test cases in docs/write_test.rst will reports an assertion exception error due to the insignificant numerical error between ti.atan2(y, x) and math.atan2(y, x), the ti.approx(r[None]) will help these test cases pass these tests.

@archibate archibate requested review from yuanming-hu, rexwangcc and archibate and removed request for yuanming-hu October 2, 2020 14:31
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.

Good job!

Copy link
Collaborator

@rexwangcc rexwangcc left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for updating the docs! (note I have resolved the conflicts on your branch)

@codecov
Copy link

codecov bot commented Oct 3, 2020

Codecov Report

Merging #1911 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1911   +/-   ##
=======================================
  Coverage   43.86%   43.86%           
=======================================
  Files          45       45           
  Lines        6199     6199           
  Branches     1101     1101           
=======================================
  Hits         2719     2719           
  Misses       3311     3311           
  Partials      169      169           

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 ba9dbfa...b2e35b9. Read the comment docs.

@archibate archibate changed the title [doc] Use "ti.approx(r[None])" instead of some "r[None]" in "docs/write_test.rst" to make sure the test case scripts pass the assert sentence. [doc] Guard values with "ti.approx" in "docs/write_test.rst" to allow FP-error tolerance Oct 3, 2020
@archibate archibate merged commit 6ca7b8e into taichi-dev:master Oct 3, 2020
@yuanming-hu yuanming-hu mentioned this pull request Oct 3, 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