Skip to content

DOC: Add datetime64 example for 'Now' to get the current time - #26477

Closed
Shreyjaradi wants to merge 3 commits into
numpy:mainfrom
Shreyjaradi:main
Closed

Shreyjaradi wants to merge 3 commits into
numpy:mainfrom
Shreyjaradi:main

Conversation

@Shreyjaradi

Copy link
Copy Markdown

No description provided.

@mattip

mattip commented May 19, 2024

Copy link
Copy Markdown
Member

This fails doctests. You should add a +SKIP directive, like here

>>> rng.random() #doctest: +SKIP

File "/tmp/tmpeo8sv853/doc/source/reference/arrays.datetime.rst", line 93, in doc/source/reference/arrays.datetime.rst
Failed example:
    np.datetime64('now', 'ms')
Expected:
    numpy.datetime64('2024-05-18T18:02:42.000')
Got:
    np.datetime64('2024-05-18T18:58:30.000')

@Shreyjaradi

Shreyjaradi commented May 20, 2024 •

Copy link
Copy Markdown
Author

@mattip Thank you so much, I have made the changes, this is my first open source contribution at PyCon US 2024 Pittsburgh.

@Shreyjaradi

Copy link
Copy Markdown
Author

@mattip , Can we close this ?

@rossbar

rossbar commented May 21, 2024

Copy link
Copy Markdown
Contributor

Just FYI, it's always a good idea to submit features on a branch other than your main branch - one reason why is that maintainers often push minor suggestions to the PR to make things quicker; however this is not possible for PRs that originate from the main branch on your fork. Just a little nugget for next time!

I will go ahead and close as requested!

@rossbar rossbar closed this May 21, 2024
@Shreyjaradi

Shreyjaradi commented May 21, 2024 via email

Copy link
Copy Markdown
Author

@MattFisher

Copy link
Copy Markdown

@rossbar I think maybe @Shreyjaradi meant "Can we merge this?" ?

Issue #10003 is still open and the "now" and "today" strings remain undocumented.
I came across the problem and started implementing a fix before I found this PR.

@charris charris changed the title Addressing Issue 10003 : Adding datetime64 example for 'Now' to get the current time DOC: Add datetime64 example for 'Now' to get the current time Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

5 participants