TensorFunctionLibrary
symbolica.community.spenso Class
TensorFunctionLibrary()A registry of elementwise tensor functions used during network evaluation.
Constructor
#Create a new empty tensor function library.
Initializes an empty library ready for registering tensor functions.
Returns
TensorFunctionLibrary
A new empty function library
Examples
from symbolica.community.spenso import TensorFunctionLibrary
lib = TensorFunctionLibrary()Member details
register
Method#
register(function: BroadcastFunction, callback: Any) -> NoneRegister an elementwise callback for concrete tensor execution.
The callback receives a Python float or complex matching each input value and must return either type. The result uses complex storage if any returned value is complex; otherwise it uses real storage.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
function | BroadcastFunction | — | — |
callback | Any | — | — |
View generated signature source: docs/api/python/spynso3.pyi:1348