MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / default_units

Method default_units

lib/matplotlib/dates.py:1769–1786  ·  view source on GitHub ↗

Return the `~datetime.tzinfo` instance of *x* or of its first element, or None

(x, axis)

Source from the content-addressed store, hash-verified

1767
1768 @staticmethod
1769 def default_units(x, axis):
1770 """
1771 Return the `~datetime.tzinfo` instance of *x* or of its first element,
1772 or None
1773 """
1774 if isinstance(x, np.ndarray):
1775 x = x.ravel()
1776
1777 try:
1778 x = cbook._safe_first_finite(x)
1779 except (TypeError, StopIteration):
1780 pass
1781
1782 try:
1783 return x.tzinfo
1784 except AttributeError:
1785 pass
1786 return None
1787
1788
1789class ConciseDateConverter(DateConverter):

Callers 2

update_unitsMethod · 0.45
default_unitsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected