(typingctx, categories, ordered)
return sig, codegen
Creates CategoricalDtype object.

    Assertions:
        categories - Tuple of literal values or None
        ordered - literal Bool
Creates CategoricalDtype object.
Creates CategoricalDtype object .
def _CategoricalDtype_intrinsic(typingctx, categories, ordered):
    """
    Creates CategoricalDtype object.

    Assertions:
        categories - Tuple of literal values or None
        ordered - literal Bool
    """
    if isinstance(categories, types.NoneType):
        categories_list = None
    if isinstance(categories, types.Tuple):
        categories_list = [c.literal_value for c in categories]

    if isinstance(ordered, types.NoneType):
        ordered_value = None
    if isinstance(ordered, types.Literal):
        ordered_value = ordered.literal_value

    return_type = CategoricalDtypeType(categories_list, ordered_value)
    sig = return_type(categories, ordered)

    def codegen(context, builder, signature, args):
        # All CategoricalDtype objects are dummy values in LLVM.
        # They only exist in the type level.
        return context.get_dummy_value()

    return sig, codegen
def _CategoricalDtype_intrinsic ( typingctx , categories , ordered ) : if isinstance ( categories , types . NoneType ) : categories_list = None if isinstance ( categories , types . Tuple ) : categories_list = [ c . literal_value for c in categories ] if isinstance ( ordered , types . NoneType ) : ordered_value = None if isinstance ( ordered , types . Literal ) : ordered_value = ordered . literal_value return_type = CategoricalDtypeType ( categories_list , ordered_value ) sig = return_type ( categories , ordered ) def codegen ( context , builder , signature , args ) : # All CategoricalDtype objects are dummy values in LLVM. # They only exist in the type level. return context . get_dummy_value ( ) return sig , codegen