

def convert(values):
    ' convert the numpy values to a list '
    dtype = values.dtype
    if is_categorical_dtype(values):
        return values
    elif is_object_dtype(dtype):
        return values.ravel().tolist()
    if needs_i8_conversion(dtype):
        values = values.view('i8')
    v = values.ravel()
    if (compressor == 'zlib'):
        _check_zlib()
        if (dtype == np.object_):
            return v.tolist()
        v = v.tostring()
        return ExtType(0, zlib.compress(v))
    elif (compressor == 'blosc'):
        _check_blosc()
        if (dtype == np.object_):
            return values.tolist()
        v = v.tostring()
        return ExtType(0, blosc.compress(v, typesize=dtype.itemsize))
    return ExtType(0, v.tostring())

dataset/ETHPy150Open pydata/pandas/pandas/io/packers.py convert/VarMisuse@155/205 `v`->`values`