INNER CODE UNIT · Python

_convert_args

ArcadeData/arcadedb · bindings/python/src/arcadedb_embedded/core.py:74

    def _convert_args(args):
        if not args:
            return []

        # Historical semantics (kept for compatibility): a SINGLE list/tuple
        # argument is the positional-parameter array itself — one element per
        # `?` placeholder — matching how JPype bound it to the Object[]
        # varargs before explicit conversion existed. It expands here, with
        # per-element conversion.
        if len(args) == 1 and isinstance(args[0], (list, tuple)):
            args = tuple(args[0])

        converted_args = []
        for arg in args:
            if _np is not None and isinstance(arg, _np.ndarray):
                converted_args.append(to_java_float_array(arg))
            elif isinstance(arg, (Mapping, list, tuple, set)):
                # A collection AMONG multiple args is a single collection-typed

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…