def dt64arr_to_periodarr(data, freq, tz): if data.dtype != np.dtype('M8[ns]'): raise ValueError('Wrong dtype: %s' % data.dtype) base, mult = _gfc(freq) return tslib.dt64arr_to_periodarr(data.view('i8'), base, tz)
def dt64arr_to_periodarr(data, freq, tz): if data.dtype != np.dtype("M8[ns]"): raise ValueError("Wrong dtype: %s" % data.dtype) base, mult = _gfc(freq) return tslib.dt64arr_to_periodarr(data.view("i8"), base, tz)