File tree 1 file changed +2
-11
lines changed
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -1222,17 +1222,8 @@ def _get_period_bins(self, ax):
1222
1222
# NaT handling as in pandas._lib.lib.generate_bins_dt64()
1223
1223
nat_count = 0
1224
1224
if memb .hasnans :
1225
- import warnings
1226
- with warnings .catch_warnings ():
1227
- warnings .filterwarnings ('ignore' , 'numpy equal will not check '
1228
- 'object identity' )
1229
- nat_mask = memb .base == tslib .NaT
1230
- # raises "FutureWarning: numpy equal will not check object
1231
- # identity in the future. The comparison did not return the
1232
- # same result as suggested by the identity (`is`)) and will
1233
- # change."
1234
- nat_count = np .sum (nat_mask )
1235
- memb = memb [~ nat_mask ]
1225
+ nat_count = np .sum (memb ._isnan )
1226
+ memb = memb [~ memb ._isnan ]
1236
1227
1237
1228
# if index contains no valid (non-NaT) values, return empty index
1238
1229
if not len (memb ):
You can’t perform that action at this time.
0 commit comments