← All ivy-nodes
IVYXSTUDIO · IVY NODE
C
Callable
ivy.node.callable · v0.1.0
ivyx✓
Returns a function that accepts any arguments and does nothing, as a placeholder where a node needs a callable. The function is a handle for the next node in the same run.
#Callable
Inputs
No fields declared.
Outputs
| Field | Type | Description |
|---|---|---|
| functionrequired | Not declared | A function that accepts any arguments and returns None. |
Source
python
# Input preparation
inp = __ivy_ctx__["nodes"][__ivy_node_id__]["input"]
# Compute
class Callable:
"""Placeholder callable factory; produces a generic no-op callable reference."""
def build(self):
def callable_function(*args, **kwargs):
return None
return callable_function
node = Callable()
function = node.build()
# Output collection (runner reads __ivy_ctx__)
out = __ivy_ctx__["nodes"][__ivy_node_id__]["output"]
out["function"] = functionTests
Requires: python:3.9
- a-function
The node returns a function.