'Match a string cqltype (e.g. \'int\' or \'blob\') with a numpy dtype'

def match_dtype(self, datatype, dtype):

    if (datatype == 'smallint'):
        self.match_dtype_props(dtype, 'i', 2)
    elif (datatype == 'int'):
        self.match_dtype_props(dtype, 'i', 4)
    elif (datatype in ('bigint', 'counter')):
        self.match_dtype_props(dtype, 'i', 8)
    elif (datatype == 'float'):
        self.match_dtype_props(dtype, 'f', 4)
    elif (datatype == 'double'):
        self.match_dtype_props(dtype, 'f', 8)
    else:
        self.assertEqual(dtype.kind, 'O', msg=(dtype, datatype))
