Argument

Defines a single Argument for a C-level caller to support default values, etc. We use a two-pronged approach where we have a set of ArgumentType serializers/deserializers

arg_types: list

 

__init__(self, name, dtype, default=None): 
  • name: str

    the name of the argument

  • dtype: ArgumentType

    the type of the argument; at some point we’ll support type inference…

  • default: Any

    the default value for the argument

 

infer_type(arg): 

Infers the type of an argument

  • arg: ArgumentType | str | type | ctypes type
  • :returns: _

 

infer_type_type(type_key): 

 

infer_type_str(argstr): 

 

inferred_type_string(arg): 

returns a type string for the inferred type

 

prep_value(self, val): 

 

is_pointer(self): 

 

is_array(self): 

 

@property
dtypes(self): 

 

@property
typechar(self): 

 

@property
cpp_signature(self): 

 

__repr__(self): 

Feedback

Examples

Templates

Documentation