Skip to content

Add note about risk of round-off errors for Time. - #10135

Merged
mhvk merged 2 commits into
astropy:masterfrom
mhvk:time-precision-adding-zero-to-utc
Apr 12, 2020
Merged

mhvk merged 2 commits into
astropy:masterfrom
mhvk:time-precision-adding-zero-to-utc

Conversation

@mhvk

@mhvk mhvk commented Apr 10, 2020

Copy link
Copy Markdown
Contributor

fixes #6970 - adding a note about round-off and the explicit example that adding 0 to times in UTC can be surprising.

Comment thread docs/conf.py Outdated
.. |minimum_python_version| replace:: {0.__minimum_python_version__}
.. |minimum_numpy_version| replace:: {0.__minimum_numpy_version__}
.. |minimum_scipy_version| replace:: {0.__minimum_scipy_version__}
.. |minimum_scipy_version| replace:: nonsense

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

O, darn, that shouldn't have gone in - #10137 - I'll take it out! (and will use ci skip since this worked already)

@mhvk
mhvk force-pushed the time-precision-adding-zero-to-utc branch from b75304a to 5a5c293 Compare April 10, 2020 21:49
@mhvk

mhvk commented Apr 10, 2020

Copy link
Copy Markdown
Contributor Author

Note to reviewers - test passed but had included something unrelated (#10135 (comment)), so re-ran skipping CI without that.

@mhvk

mhvk commented Apr 10, 2020

Copy link
Copy Markdown
Contributor Author

@bsipocz - I see [docs only] didn't do anything - I guess that one has gone?

@bsipocz

bsipocz commented Apr 10, 2020

Copy link
Copy Markdown
Member

Yeah, that was just a home grown workaround for travis, but it doesn't work for circleCI. Use [skip travis] for those commits instead (it will still run a ton of other circleCI jobs, but at least doesn't fire up the travis matrix)

@taldcroft taldcroft left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good pending fix of the typo.

Comment thread docs/time/index.rst Outdated
errors can cause two times to be not strictly equal even if
mathematically they should be. For times in UTC in particular, this
can lead to surprising behaviour, because when one adds a
|TimeDelta|, which cannot be have a scale of UTC, the UTC time is

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Typo be have.

@mhvk
mhvk force-pushed the time-precision-adding-zero-to-utc branch from 5a5c293 to 8b997ec Compare April 12, 2020 16:03
@mhvk

mhvk commented Apr 12, 2020

Copy link
Copy Markdown
Contributor Author

OK, fixed. I cancelled most of the travis builds since this passed before; hoped to also cancel all but html circle-ci builds but seem unable to.

@mhvk
mhvk merged commit 44c8be0 into astropy:master Apr 12, 2020
@mhvk
mhvk deleted the time-precision-adding-zero-to-utc branch April 12, 2020 16:47
@bsipocz bsipocz modified the milestones: v4.1, v4.0.2 Apr 28, 2020
bsipocz pushed a commit that referenced this pull request Apr 28, 2020
Add note about risk of round-off errors for Time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Float comparison issues with time and quantity

3 participants