TensorEvaluator
symbolica.community.tensor Class
TensorEvaluator()Symbolica evaluator returning component tensors in their original logical layout.
Construct with Tensor.evaluator. The scalar_evaluator property exposes the underlying Symbolica Evaluator for precision evaluation, export and inspection.
Member details
parameters
Property · read-only#parameters: list[Expression] Symbolic inputs in evaluation order.
input_size
Property · read-only#input_size: intNumber of entries in an input row.
output_shape
Property · read-only#output_shape: tuple[int, ...] Logical shape of each output tensor, excluding the batch dimension.
supports_real
Property · read-only#supports_real: boolWhether all exact coefficients are real.
scalar_evaluator
Property · read-only#scalar_evaluator: EvaluatorUnderlying Symbolica Evaluator, with outputs in logical component order.
Use for arbitrary-precision evaluation, export, or instruction inspection. These operations return scalar components; they do not wrap tensor metadata.
__repr__
Method#__repr__() -> strDescribe the output tensor layout and supported numeric domains.
evaluate
Method#evaluate(inputs: numpy.ArrayLike) -> list[Tensor] Evaluate real inputs using Symbolica's ArrayLike input conventions.
Returns one Tensor per row. A flat input array is also accepted, with the same reshaping and validation as Evaluator.evaluate.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
inputs | numpy. | — | — |
evaluate_complex
Method#jit_compile
Method#jit_compile(jit_compile: bool, direct_translation: Optional[bool] = None, optimization_level: Optional[int] = None, options: Optional[Mapping[str, str]] = None) -> None Enable or disable JIT compilation with Symbolica's settings.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
jit_compile | bool | — | — |
direct_translation | Optional[ | None | — |
optimization_level | Optional[ | None | — |
options | Optional[ | None | — |
set_real_params
Method#set_real_params(real_params: Sequence[int], sqrt_real: bool = False, log_real: bool = False, powf_real: bool = False, real_if_args_real: bool = False, verbose: bool = False) -> None Mark real parameters using the same assumptions as Evaluator.set_real_params.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
real_params | Sequence[ | — | — |
sqrt_real | bool | False | — |
log_real | bool | False | — |
powf_real | bool | False | — |
real_if_args_real | bool | False | — |
verbose | bool | False | — |
compile
Method#compile(function_name: str, filename: str, library_name: str, number_type: str, inline_asm: str = 'default', optimization_level: int = 3, native: bool = True, compiler_path: Optional[str] = None, compiler_flags: Optional[Sequence[str]] = None, custom_header: Optional[str] = None, cuda_number_of_evaluations: int = 1, cuda_block_size: int = 512) -> CompiledTensorEvaluator Compile a native evaluator with the same options as Evaluator.compile.
number_type selects real, complex, real_4x, complex_4x, cuda_real or cuda_complex. The returned object's evaluate method uses that number type and returns tensors. Source and library files are written to the given paths.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
function_name | str | — | — |
filename | str | — | — |
library_name | str | — | — |
number_type | str | — | — |
inline_asm | str | 'default' | — |
optimization_level | int | 3 | — |
native | bool | True | — |
compiler_path | Optional[ | None | — |
compiler_flags | Optional[ | None | — |
custom_header | Optional[ | None | — |
cuda_number_of_evaluations | int | 1 | — |
cuda_block_size | int | 512 | — |
View generated signature source: docs/api/python/spynso3.pyi:3774