def get_list_qtype(array):
    '''Finds out a corresponding qtype for a specified `QList`/`numpy.ndarray` 
    instance.
    
    :Parameters:
     - `array` (`QList` or `numpy.ndarray`) - array to be checked
    
    :returns: `integer` - qtype matching the specified array object
    '''
    if not isinstance(array, numpy.ndarray):
        raise ValueError('array parameter is expected to be of type: numpy.ndarray, got: %s' % type(array))

    if isinstance(array, QList):
        return -abs(array.meta.qtype)

    qtype = None

    if str(array.dtype) in ('|S1', '<U1', '>U1', '|U1') :
        qtype = QCHAR

    if qtype is None:
        qtype = Q_TYPE.get(array.dtype.type, None)

    if qtype is None and array.dtype.type in (numpy.datetime64, numpy.timedelta64):
        qtype = TEMPORAL_PY_TYPE.get(str(array.dtype), None)

    if qtype is None:
        # determinate type based on first element of the numpy array
        qtype = Q_TYPE.get(type(array[0]), QGENERAL_LIST)

    return qtype
def get_list_qtype ( array ) : if not isinstance ( array , numpy . ndarray ) : raise ValueError ( 'array parameter is expected to be of type: numpy.ndarray, got: %s' % type ( array ) ) if isinstance ( array , QList ) : return - abs ( array . meta . qtype ) qtype = None if str ( array . dtype ) in ( '|S1' , '<U1' , '>U1' , '|U1' ) : qtype = QCHAR if qtype is None : qtype = Q_TYPE . get ( array . dtype . type , None ) if qtype is None and array . dtype . type in ( numpy . datetime64 , numpy . timedelta64 ) : qtype = TEMPORAL_PY_TYPE . get ( str ( array . dtype ) , None ) if qtype is None : qtype = Q_TYPE . get ( type ( array [ 0 ] ) , QGENERAL_LIST ) return qtype
Finds out a corresponding qtype for a specified `QList`/`numpy.ndarray` 
    instance.
    
    :Parameters:
     - `array` (`QList` or `numpy.ndarray`) - array to be checked
    
    :returns: `integer` - qtype matching the specified array object