PythonOverloads¶
Note
Generated from the C++ headers by apiary --emit-cpp-docs-json.
-
void compute_python_overloads(BoundFunction &f)¶
Compute and assign
f.python_overloads.Note
Idempotent — calling twice on the same function clears the previous result first.
Warning
Calls to this must happen after the Visitor has finished populating instantiations.
- Parameters:
f – The bound function whose
python_overloadsare computed and assigned.
-
void compute_python_overloads(Module &module_)¶
Walk every function in
module_and run compute_python_overloads on it.- Parameters:
module – The module whose functions are processed.
-
std::vector<std::string> dtype_aliases_for(const std::string &cpp_type)¶
Map a C++ scalar type to its accepted dtype-string aliases.
Note
The dispatcher path only triggers for known dtypes.
- Parameters:
cpp_type – The C++ scalar type to map.
- Returns:
The accepted dtype-string aliases, or empty when the type isn’t a recognized dtype.
-
std::string pick_default_dtype(const std::vector<std::string> &dtype_values_in_order)¶
Pick the default dtype string for a dispatcher group.
Note
Numpy convention favors
float64(double) when present; otherwise the first instance’s first alias.- Parameters:
dtype_values_in_order – The dtype values in instantiation order.
- Returns:
The default dtype string.
-
std::vector<std::string> split_instantiation_args(const std::string &combo)¶
Split a per-instantiation comma-joined string into individual values, respecting
<>nesting.- Parameters:
combo – The comma-joined instantiation string, e.g.
"float, 2".- Returns:
The individual values, e.g.
{"float", "2"}.