Exemplo n.º 1
0
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)
Exemplo n.º 2
0
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)
Exemplo n.º 3
0
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)