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: Improve datetime64 docs. #18957

Merged
merged 10 commits into from
May 11, 2021
Merged

DOC: Improve datetime64 docs. #18957

merged 10 commits into from
May 11, 2021

Conversation

katleszek
Copy link
Contributor

@katleszek katleszek commented May 9, 2021

Adding clarification to datetime64. Resolves #14299

@melissawm
Copy link
Member

Hello, @katleszek , can you add to the PR description a note about which issue this will close? You can check this page for more info on how to do this: https://docs.github.com/pt/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword

@rgommers
Copy link
Member

rgommers commented May 9, 2021

Thanks @katleszek! The issue also talks about the "experimental" note on https://numpy.org/devdocs/reference/arrays.datetime.html that should be removed:

image

We can safely get rid of that now.

Copy link
Member

@rgommers rgommers left a comment

Choose a reason for hiding this comment

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

Thanks @katleszek. The example is good, I suggest a couple of textual changes.

doc/source/reference/arrays.datetime.rst Outdated Show resolved Hide resolved
doc/source/reference/arrays.datetime.rst Outdated Show resolved Hide resolved
@katleszek
Copy link
Contributor Author

Adding clarification to datetime64. Resolves #14299

@charris charris changed the title Doc datetime DOC: Improve datetime64 docs. May 9, 2021
@rgommers
Copy link
Member

rgommers commented May 9, 2021

The refguide checker on Azure is unhappy:

ValueError: line 8 of the docstring for Datetime64 has inconsistent leading whitespace: "    numpy.datetime64('1980')   "

You can reproduce this failure locally by running python runtests.py --refguide-check.

@katleszek
Copy link
Contributor Author

Thanks for the advice! Fixed the Azure unhappiness, but get a smoke_test fail - how can I check what is wrong with this one?

katleszek and others added 2 commits May 11, 2021 09:22
Co-authored-by: Matti Picus <matti.picus@gmail.com>
Co-authored-by: Matti Picus <matti.picus@gmail.com>
Co-authored-by: Matti Picus <matti.picus@gmail.com>
@mattip mattip merged commit 99b396b into numpy:main May 11, 2021
@mattip
Copy link
Member

mattip commented May 11, 2021

Thanks @katleszek

@@ -218,10 +218,15 @@ def add_newdoc_for_scalar_type(obj, fixed_aliases, doc):

add_newdoc_for_scalar_type('datetime64', [],
"""
A datetime stored as a 64-bit integer, counting from ``1970-01-01T00:00:00``.
Copy link
Member

Choose a reason for hiding this comment

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

Doesn't it make sense to keep this description too? This change seems to remove information about datetime64 and add information about datetime64.__new__. Ideally we'd have both!

Copy link
Member

Choose a reason for hiding this comment

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

Sure.

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.

DOC: Improve datetime64 docs?
6 participants