8000 Add num2timedelta method with test by dstansby · Pull Request #8870 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Add num2timedelta method with test #8870

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

Merged
merged 2 commits into from
Aug 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update docstring and add num2timedelta to __all__
  • Loading branch information
dstansby committed Jul 25, 2017
commit 6dd8ef9934c5e29b2ed7cc7cdfce7e3e516d1a26
4 changes: 2 additions & 2 deletions lib/matplotlib/dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
import matplotlib.ticker as ticker


__all__ = ('date2num', 'num2date', 'drange', 'epoch2num',
__all__ = ('date2num', 'num2date', 'num2timedelta', 'drange', 'epoch2num',
'num2epoch', 'mx2num', 'DateFormatter',
'IndexDateFormatter', 'AutoDateFormatter', 'DateLocator',
'RRuleLocator', 'AutoDateLocator', 'YearLocator',
Expand Down Expand Up @@ -426,7 +426,7 @@ def num2timedelta(x):

Returns
-------
:class:`timedelta`
:class:`timedelta` or list[:class:`timedelta`]

"""
if not cbook.iterable(x):
Expand Down
0