fastscapelib.flow.numba.flow_kernel.NumbaFlowKernelData

class fastscapelib.flow.numba.flow_kernel.NumbaFlowKernelData(grid_shape, spec_keys, grid_spec_keys, jitclass_obj)

Proxy mapping representing the (numba) flow kernel data.

Flow kernel data is an intermediate structure that allows accessing any external data (either scalar values or values defined on each node of a FlowGraph) from within the kernel function.

It is returned by create_flow_kernel() and required by apply_kernel() alongside the NumbaFlowKernel object.

This class implements the immutable mapping interface but still allows setting or updating kernel data exclusively via the .bind() method (with data validation).

For convenience, this class also provides attribute-style access to kernel data.

__init__(grid_shape, spec_keys, grid_spec_keys, jitclass_obj)

Methods

__init__(grid_shape, spec_keys, ...)

bind(**kwargs)

Set or update kernel data.

check_bindings()

Check data that is bound to the kernel.

get(k[,d])

items()

keys()

values()

Attributes

grid_var_names

Return the names of kernel input and output array variables.

jitclass_obj

Return the numba jit-compiled class instance holding or referencing the kernel data.

kernel_data

Return the object used to access kernel data from C++.

var_names

Return the names of all kernel input and output variables.