MCPcopy
hub / github.com/google/earthengine-api / apply

Method apply

python/ee/function.py:65–77  ·  view source on GitHub ↗

Calls the function with a dictionary of named arguments. Args: named_args: A dictionary of named arguments to pass to the function. Returns: A ComputedObject representing the called function. If the signature specifies a recognized return type, the returned value will be

(self, named_args: dict[str, Any])

Source from the content-addressed store, hash-verified

63 return self.apply(self.nameArgs(args, kwargs))
64
65 def apply(self, named_args: dict[str, Any]) -> computedobject.ComputedObject:
66 """Calls the function with a dictionary of named arguments.
67
68 Args:
69 named_args: A dictionary of named arguments to pass to the function.
70
71 Returns:
72 A ComputedObject representing the called function. If the signature
73 specifies a recognized return type, the returned value will be cast
74 to that type.
75 """
76 result = computedobject.ComputedObject(self, self.promoteArgs(named_args))
77 return Function._promoter(result, self.getReturnType())
78
79 def promoteArgs(self, args: dict[str, Any]) -> dict[str, Any]:
80 """Promotes arguments to their types based on the function's signature.

Callers 1

callMethod · 0.95

Calls 2

promoteArgsMethod · 0.95
getReturnTypeMethod · 0.95

Tested by

no test coverage detected