File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,13 @@ def _new_DatetimeIndex(cls, d):
49
49
# so need to localize
50
50
tz = d .pop ('tz' , None )
51
51
52
- result = cls .__new__ (cls , verify_integrity = False , ** d )
52
+ with warnings .catch_warnings ():
53
+ # we ignore warnings from passing verify_integrity=False
54
+ # TODO: If we knew what was going in to **d, we might be able to
55
+ # go through _simple_new instead
56
+ warnings .simplefilter ("ignore" )
57
+ result = cls .__new__ (cls , verify_integrity = False , ** d )
58
+
53
59
if tz is not None :
54
60
result = result .tz_localize ('UTC' ).tz_convert (tz )
55
61
return result
@@ -569,8 +575,9 @@ def snap(self, freq='S'):
569
575
snapped [i ] = s
570
576
571
577
# we know it conforms; skip check
572
- return DatetimeIndex (snapped , freq = freq , verify_integrity = False )
578
+ return DatetimeIndex . _simple_new (snapped , freq = freq )
573
579
# TODO: what about self.name? if so, use shallow_copy?
580
+ # TODO: What about tz?
574
581
575
582
def unique (self , level = None ):
576
583
if level is not None :
You can’t perform that action at this time.
0 commit comments