Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2e68ff commit 752e403Copy full SHA for 752e403
lib/matplotlib/dates.py
@@ -430,6 +430,9 @@ def date2num(d):
430
For details see the module docstring.
431
"""
432
433
+ if hasattr(d, "values"):
434
+ d = d.values
435
+
436
if ((isinstance(d, np.ndarray) and np.issubdtype(d.dtype, np.datetime64))
437
or isinstance(d, np.datetime64)):
438
return _dt64_to_ordinalf(d)
lib/matplotlib/units.py
@@ -154,6 +154,9 @@ def get_converter(self, x):
154
# DISABLED cached = self._cached.get(idx)
155
# DISABLED if cached is not None: return cached
156
157
+ if hasattr(x, "values"):
158
+ x = x.values
159
160
converter = None
161
classx = getattr(x, '__class__', None)
162
0 commit comments