BroadcastFunction
symbolica.community.spenso Class
BroadcastFunction(name: str, *, is_symmetric: Optional[bool] = None, is_antisymmetric: Optional[bool] = None, is_cyclesymmetric: Optional[bool] = None, is_linear: Optional[bool] = None, is_flat: Optional[bool] = None, is_scalar: Optional[bool] = None, is_real: Optional[bool] = None, is_integer: Optional[bool] = None, is_positive: Optional[bool] = None, tags: Optional[Sequence[str]] = None, aliases: Optional[Sequence[str]] = None, normalization: Optional[Transformer | Callable[[Expression], Expression]] = None, print: Optional[Any] = None, derivative: Optional[Any] = None, series: Optional[Any] = None, eval: Optional[Any] = None, data: Optional[Expression | int | Float | int | float | str | decimal.Decimal | ComplexFloat | Float | int | float | str | decimal.Decimal | complex | tuple[Float | int | float | str | decimal.Decimal, Float | int | float | str | decimal.Decimal] | str | dict | list | bytes] = None)A unary Symbolica function whose action is broadcast over tensor entries.
Constructor
#Register a Symbolica function for elementwise application to tensor entries.
The function is always tagged as a Spenso broadcast and cannot also be a tensor head.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
name | str | — | — |
is_symmetric | Optional[bool] | None | — |
is_antisymmetric | Optional[bool] | None | — |
is_cyclesymmetric | Optional[bool] | None | — |
is_linear | Optional[bool] | None | — |
is_flat | Optional[bool] | None | — |
is_scalar | Optional[bool] | None | — |
is_real | Optional[bool] | None | — |
is_integer | Optional[bool] | None | — |
is_positive | Optional[bool] | None | — |
tags | Optional[Sequence[str]] | None | — |
aliases | Optional[Sequence[str]] | None | — |
normalization | Optional[Transformer | Callable[[Expression], Expression]] | None | — |
print | Optional[Any] | None | — |
derivative | Optional[Any] | None | — |
series | Optional[Any] | None | — |
eval | Optional[Any] | None | — |
data | Optional[Expression | int | Float | int | float | str | decimal.Decimal | ComplexFloat | Float | int | float | str | decimal.Decimal | complex | tuple[Float | int | float | str | decimal.Decimal, Float | int | float | str | decimal.Decimal] | str | dict | list | bytes] | None | — |
Member details
conj
Static method__repr__
Method__str__
Methodto_expression
Methodhas_tag
Method#
has_tag(tag: str) -> boolWhether the registered function carries tag.
Unqualified names also match tags registered in Symbolica's Python namespace.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
tag | str | — | — |
get_tags
Method__call__
Method#
Overloads
Overload 1 #
__call__(arg: Tensor | TensorNetwork) -> TensorNetworkApply this unary function lazily to a concrete tensor or tensor network.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
arg | Tensor | TensorNetwork | — | — |
Overload 2 #
__call__(arg: TensorExpression) -> TensorExpressionApply this unary function elementwise, preserving a structured interface.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
arg | TensorExpression | — | — |
Overload 3 #
__call__(arg: Expression | int | Float | int | float | str | decimal.Decimal | ComplexFloat | Float | int | float | str | decimal.Decimal | complex | tuple[Float | int | float | str | decimal.Decimal, Float | int | float | str | decimal.Decimal]) -> ExpressionApply this unary function to an ordinary scalar expression.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
arg | Expression | int | Float | int | float | str | decimal.Decimal | ComplexFloat | Float | int | float | str | decimal.Decimal | complex | tuple[Float | int | float | str | decimal.Decimal, Float | int | float | str | decimal.Decimal] | — | — |
View generated signature source: docs/api/python/spynso3.pyi:15