decorators#

This file contains the decorators that must be used to document the data format the functions expect when called from Investigator

Functions

InvestigatorPyFunction1D(func)

This decorator should be used to indicate that the function expects input data in the form of a 1D array per sample

InvestigatorPyFunction2D(func)

This decorator should be used to indicate that the function expects input data in the form of a 2D array.

cegalprizm.investigator.decorators.InvestigatorPyFunction1D(func: Callable)#

This decorator should be used to indicate that the function expects input data in the form of a 1D array per sample

The decorated function will be treated as if typed as follows:

function calculate(input: double[]) -> double

Investigator will ensure that only a single sample is passed to the function. The function is expected to return a single output value.

Parameters

func (Callable) – The function being decoarated

cegalprizm.investigator.decorators.InvestigatorPyFunction2D(func: Callable)#

This decorator should be used to indicate that the function expects input data in the form of a 2D array.

The decorated function will be treated as if typed as follows:

function calculate(input: double[][]) -> double[]

Investigator will ensure that an array of samples is passed to the function. Each sample in the array will contain an array of input value. The function is expected to return an array of output values where each value is the output from processing a single sample.

Parameters

func (Callable) – The function being decoarated