(dtype)
return types.Array(dtype, 1, 'C')
get underlying default array type of series based on its dtype
get underlying default array type of series based on its dtype
get underlying default array type of series based on its dtype
def _get_series_array_type(dtype):
    """get underlying default array type of series based on its dtype
    """
    # list(list(str))
    if dtype == types.List(string_type):
        # default data layout is list but split view is used if possible
        return list_string_array_type
    # string array
    elif dtype == string_type:
        return string_array_type

    # categorical
    if isinstance(dtype, CategoricalDtypeType):
        # TODO: pass codes array if exists
        return Categorical(dtype)

    # use recarray data layout for series of tuples
    if isinstance(dtype, types.BaseTuple):
        if any(not isinstance(t, types.Number) for t in dtype.types):
            # TODO: support more types. what types can be in recarrays?
            raise ValueError("series tuple dtype {} includes non-numerics".format(dtype))
        np_dtype = np.dtype(
            ','.join(str(t) for t in dtype.types), align=True)
        dtype = from_dtype(np_dtype)

    # TODO: other types?
    # regular numpy array
    return types.Array(dtype, 1, 'C')
def _get_series_array_type ( dtype ) : # list(list(str)) if dtype == types . List ( string_type ) : # default data layout is list but split view is used if possible return list_string_array_type # string array elif dtype == string_type : return string_array_type # categorical if isinstance ( dtype , CategoricalDtypeType ) : # TODO: pass codes array if exists return Categorical ( dtype ) # use recarray data layout for series of tuples if isinstance ( dtype , types . BaseTuple ) : if any ( not isinstance ( t , types . Number ) for t in dtype . types ) : # TODO: support more types. what types can be in recarrays? raise ValueError ( "series tuple dtype {} includes non-numerics" . format ( dtype ) ) np_dtype = np . dtype ( ',' . join ( str ( t ) for t in dtype . types ) , align = True ) dtype = from_dtype ( np_dtype ) # TODO: other types? # regular numpy array return types . Array ( dtype , 1 , 'C' )