Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 09ec367

Browse files
Update dates.py
Co-authored-by: Tim Hoffmann <[email protected]>
1 parent bb0047a commit 09ec367

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

lib/matplotlib/dates.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,7 @@ def _dt64_to_ordinalf(d):
325325
dt += extra.astype(np.float64) / 1.0e9
326326
dt = dt / SEC_PER_DAY
327327

328-
NaT_int = np.datetime64('NaT', 's').astype(np.int64)
329-
d_int = d.astype(np.int64)
330-
dt[d_int == NaT_int] = np.nan
328+
dt[np.isnat(d)] = np.nan
331329
return dt
332330

333331

0 commit comments

Comments
 (0)