.. ---------------------------------------------------------------------------------------------- Copyright (c) The Einsums Developers. All rights reserved. Licensed under the MIT License. See LICENSE.txt in the project root for license information. ---------------------------------------------------------------------------------------------- .. _cppapi_PythonOverloads: =============== PythonOverloads =============== .. note:: Generated from the C++ headers by ``apiary --emit-cpp-docs-json``. .. cpp:namespace:: apiary .. cpp:function:: 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. :param f: The bound function whose `python_overloads` are computed and assigned. .. cpp:function:: void compute_python_overloads(Module &module_) Walk every function in `module_` and run compute_python_overloads on it. :param module_: The module whose functions are processed. .. cpp:function:: std::vector 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. :param cpp_type: The C++ scalar type to map. :returns: The accepted dtype-string aliases, or empty when the type isn't a recognized dtype. .. cpp:function:: std::string pick_default_dtype(const std::vector &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. :param dtype_values_in_order: The dtype values in instantiation order. :returns: The default dtype string. .. cpp:function:: std::vector split_instantiation_args(const std::string &combo) Split a per-instantiation comma-joined string into individual values, respecting `<>` nesting. :param combo: The comma-joined instantiation string, e.g. ``"float, 2"``. :returns: The individual values, e.g. ``{"float", "2"}``.