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):
4949 # so need to localize
5050 tz = d .pop ('tz' , None )
5151
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+
5359 if tz is not None :
5460 result = result .tz_localize ('UTC' ).tz_convert (tz )
5561 return result
@@ -569,8 +575,9 @@ def snap(self, freq='S'):
569575 snapped [i ] = s
570576
571577 # we know it conforms; skip check
572- return DatetimeIndex (snapped , freq = freq , verify_integrity = False )
578+ return DatetimeIndex . _simple_new (snapped , freq = freq )
573579 # TODO: what about self.name? if so, use shallow_copy?
580+ # TODO: What about tz?
574581
575582 def unique (self , level = None ):
576583 if level is not None :
You can’t perform that action at this time.
0 commit comments