File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -1272,17 +1272,8 @@ def _get_period_bins(self, ax):
1272
1272
# NaT handling as in pandas._lib.lib.generate_bins_dt64()
1273
1273
nat_count = 0
1274
1274
if memb .hasnans :
1275
- import warnings
1276
- with warnings .catch_warnings ():
1277
- warnings .filterwarnings ('ignore' , 'numpy equal will not check '
1278
- 'object identity' )
1279
- nat_mask = memb .base == tslib .NaT
1280
- # raises "FutureWarning: numpy equal will not check object
1281
- # identity in the future. The comparison did not return the
1282
- # same result as suggested by the identity (`is`)) and will
1283
- # change."
1284
- nat_count = np .sum (nat_mask )
1285
- memb = memb [~ nat_mask ]
1275
+ nat_count = np .sum (memb ._isnan )
1276
+ memb = memb [~ memb ._isnan ]
1286
1277
1287
1278
# if index contains no valid (non-NaT) values, return empty index
1288
1279
if not len (memb ):
You can’t perform that action at this time.
0 commit comments