Version: dev

function_table

Stable type · Document types

Tier: stable · Kind: type · Topic: Document types

JuliaTypeScriptPythonRustGo
FunctionTablenot exportedFunctionTablenot exportedFunctionTable

Julia

struct FunctionTable
FunctionTable(axes::AbstractVector{FunctionTableAxis}, data; description, interpolation, out_of_bounds, outputs, shape, schema_version)
FunctionTable

A sampled function table referenced by table_lookup AST op nodes (esm-spec §9.5, v0.4.0). Tables are syntactic sugar over §9.2’s interp.linear / interp.bilinear / index — a table_lookup query MUST be bit-equivalent to the equivalent inline-const lookup. Shape of data is [len(outputs), len(axes[0].values), len(axes[1].values), ...] when outputs is non-nothing; [len(axes[0].values), ...] otherwise.

Source

TypeScript

TypeScript does not export this type.

Python

class FunctionTable
FunctionTable(axes: list[FunctionTableAxis], data: Any, description: str | None = None, interpolation: str | None = None, out_of_bounds: str | None = None, outputs: list[str] | None = None, shape: list[int] | None = None, schema_version: str | None = None)

A sampled function table referenced by table_lookup AST ops (esm-spec §9.5, v0.4.0).

Tables are syntactic sugar over §9.2’s interp.linear / interp.bilinear / index — a table_lookup query MUST be bit-equivalent to the equivalent inline-const lookup. The shape of data is [len(outputs), len(axes[0].values), len(axes[1].values), ...] when outputs is non-empty; [len(axes[0].values), ...] otherwise.

Source

Rust

Rust does not export this type.

Go

type FunctionTable struct {
	Description   *string             `json:"description,omitempty"`
	Axes          []FunctionTableAxis `json:"axes"`
	Interpolation *string             `json:"interpolation,omitempty"`
	OutOfBounds   *string             `json:"out_of_bounds,omitempty"`
	Outputs       []string            `json:"outputs,omitempty"`
	Data          any                 `json:"data"`
	Shape         []int               `json:"shape,omitempty"`
	SchemaVersion *string             `json:"schema_version,omitempty"`
}

FunctionTable is a sampled function table (esm-spec §9.5). The shape of Data is

\[len(Outputs), len(Axes\[0\]

.Values), len(Axes

\[1\]

.Values), …] when Outputs is non-empty;

\[len(Axes\[0\]

.Values), …] otherwise. Tables are syntactic sugar over interp.linear / interp.bilinear / index — a table_lookup query MUST be bit-equivalent to the equivalent inline-const lookup.

Source · Go docs