FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

DOC: for datetime64 support by jklymak · Pull Request #9794 · matplotlib/matplotlib · GitHub

Repository navigation

DOC: for datetime64 support - #9794

Merged
story645 merged 1 commit into
matplotlib:masterfrom
jklymak:docdatetime64
Nov 16, 2017
Merged

story645 merged 1 commit into
matplotlib:masterfrom
jklymak:docdatetime64

Conversation

jklymak commented Nov 16, 2017

Copy link
Copy Markdown
Member

PR Summary

Should have been in #9779. Sorry!

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way


Matplotlib has supported `datetime.datetime` dates for a long time. We
now support `numpy.datetime64` dates as well. This should be
transparent to the user, and anywhere that `dateime.datetime` could be

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think "this should be transparent to the user" falls into the "this is simple/obvious/easy" ableist type language that I think should be avoided when possible.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I just meant they shouldn't have to do anything special to make it happen. i.e. there is no new API, they just use plot or date2num as they always have.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think it might be clearer to say that? np.datetime is now a supported type, so np.datetime objects can now be used as data inputs to any plotting function that already supports dates.

Comment thread examples/api/date.py
and num2date

All matplotlib date plotting is done by converting date instances into days
since 0001-01-01 00:00:00 UTC plus one day (for historical reasons). The

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

What historical reasons? Is there a link to the discussion anywhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Awesome. can you link to that discussion in this text to provide context.

jklymak force-pushed the docdatetime64 branch 2 times, most recently from a9e5209 to 3e3d984 Compare November 16, 2017 15:24
jklymak changed the title DOC: for datetime64 support WIP: DOC: for datetime64 support Nov 16, 2017
jklymak changed the title WIP: DOC: for datetime64 support DOC: for datetime64 support Nov 16, 2017

jklymak commented Nov 16, 2017

Copy link
Copy Markdown
Member Author

This is OK. Couldn't get inter sphinx numpy.datetime64 to give a link. Any idea what I'm doing wrong?

Copy link
Copy Markdown
Member

Maybe try :numpy:class:`datetime64` ?

jklymak commented Nov 16, 2017 •
edited
Loading

Copy link
Copy Markdown
Member Author

That doesn't appear anywhere else in the codebase. Others have use numpy.datetime64 elsewhere in the docs, so I'll leave as that and open an issue about the intersphinx issue...

EDIT: I'll try again w/ :class:numpy.datetime64

jklymak commented Nov 16, 2017

Copy link
Copy Markdown
Member Author

That doesn't work either. Opened issue... #9802

story645 merged commit 5104625 into matplotlib:master Nov 16, 2017
QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
jklymak deleted the docdatetime64 branch March 5, 2019 16:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

4 participants


Back | FazBrowse Home | New Git URL