module grammar.gactions

Inheritance diagram of mlprodict.grammar.gactions

Short summary

module mlprodict.grammar.gactions

Action definition.

source on GitHub

Classes

class

truncated documentation

MLAction

Base class for every action.

MLActionBinary

Any binary operation.

MLActionCast

Cast into another type.

MLActionConcat

Concatenate number of arrays into an array.

MLActionCst

Constant

MLActionFunction

A function.

MLActionFunctionCall

Any function call.

MLActionIfElse

Addition

MLActionReturn

Returns a results.

MLActionUnary

Any binary operation.

MLActionVar

Variable. The constant is only needed to guess the variable type.

Properties

property

truncated documentation

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

ChildrenResults

Return the last execution results.

Static Methods

staticmethod

truncated documentation

guess_type

Guesses a type given a value.

guess_type

Guesses a type given a value.

Methods

method

truncated documentation

__init__

__init__

__init__

__init__

__init__

__init__

__init__

__init__

__init__

__init__

__init__

_optional_parameters

Returns additional parameters to add the function call.

_optional_parameters

Returns additional parameters to add the function call.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates all variables.

enumerate_variables

Enumerates itself.

execute

Computes the action. Returns the output.

execute

Computes the action. Returns the output.

execute

execute

Concatenation

execute

execute

execute

Computes the action. Returns the output.

execute

execute

execute

Computes the action. Returns the output.

execute

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Returns a formated string which retruns the outputs.

graph_execution

Documentation

@file @brief Action definition.

class mlprodict.grammar.gactions.MLAction(inputs, output, name, children=None)[source]

Bases: mlprodict.grammar.api_extension.AutoAction

Base class for every action.

@param inputs type of inputs @param output output type @param name a name which identifies the action @param children actions used to compute this one

property ChildrenResults

Return the last execution results.

__init__(inputs, output, name, children=None)[source]

@param inputs type of inputs @param output output type @param name a name which identifies the action @param children actions used to compute this one

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

_export_json(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

enumerate_variables()[source]

Enumerates all variables.

execute(**kwargs)[source]

Computes the action. Returns the output.

graph_execution()[source]

Returns a formated string which retruns the outputs.

class mlprodict.grammar.gactions.MLActionBinary(act1, act2, name)[source]

Bases: mlprodict.grammar.gactions.MLAction

Any binary operation.

@param act1 first element @param act2 second element @param name operator name

__init__(act1, act2, name)[source]

@param act1 first element @param act2 second element @param name operator name

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

class mlprodict.grammar.gactions.MLActionCast(act1, new_type)[source]

Bases: mlprodict.grammar.gactions.MLActionUnary

Cast into another type.

@param act1 element @param new_type new type

__init__(act1, new_type)[source]

@param act1 element @param new_type new type

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

class mlprodict.grammar.gactions.MLActionConcat(act1, act2)[source]

Bases: mlprodict.grammar.gactions.MLActionFunctionCall

Concatenate number of arrays into an array.

@param act1 first element @param act2 second element

__init__(act1, act2)[source]

@param act1 first element @param act2 second element

execute(**kwargs)[source]

Concatenation

class mlprodict.grammar.gactions.MLActionCst(cst, inout_type=None, comment=None)[source]

Bases: mlprodict.grammar.gactions.MLAction

Constant

@param cst constant @param inout_type type @param comment comment

__init__(cst, inout_type=None, comment=None)[source]

@param cst constant @param inout_type type @param comment comment

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

_export_json(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

graph_execution()[source]

Returns a formated string which retruns the outputs.

static guess_type(value)[source]

Guesses a type given a value.

class mlprodict.grammar.gactions.MLActionFunction(act, name)[source]

Bases: mlprodict.grammar.gactions.MLActionUnary

A function.

@param act action @param name name

__init__(act, name)[source]

@param act action @param name name

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

class mlprodict.grammar.gactions.MLActionFunctionCall(name, output, *acts)[source]

Bases: mlprodict.grammar.gactions.MLAction

Any function call.

@param name function name @param output type @param *acts list of arguments

__init__(name, output, *acts)[source]

@param name function name @param output type @param *acts list of arguments

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

_optional_parameters()[source]

Returns additional parameters to add the function call.

class mlprodict.grammar.gactions.MLActionIfElse(cond, act1, act2, check_type=True, comment=None)[source]

Bases: mlprodict.grammar.gactions.MLAction

Addition

@param cond condition @param act1 first action @param ect2 second action @param check_type check ype @param comment comment

__init__(cond, act1, act2, check_type=True, comment=None)[source]

@param cond condition @param act1 first action @param ect2 second action @param check_type check ype @param comment comment

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

class mlprodict.grammar.gactions.MLActionReturn(act)[source]

Bases: mlprodict.grammar.gactions.MLAction

Returns a results.

@param act action to return

__init__(act)[source]

@param act action to return

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

execute(**kwargs)[source]

Computes the action. Returns the output.

class mlprodict.grammar.gactions.MLActionUnary(act1, name)[source]

Bases: mlprodict.grammar.gactions.MLAction

Any binary operation.

@param act1 element @param name operator name

__init__(act1, name)[source]

@param act1 element @param name operator name

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

class mlprodict.grammar.gactions.MLActionVar(value, name, inout_type=None)[source]

Bases: mlprodict.grammar.gactions.MLActionCst

Variable. The constant is only needed to guess the variable type.

@param value value @param name variable name @param inout_type type

__init__(value, name, inout_type=None)[source]

@param value value @param name variable name @param inout_type type

_export_c(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

_export_json(hook=None, result_name=None)

Wrapper to cache the result of a function.

source on GitHub

enumerate_variables()[source]

Enumerates itself.

execute(**kwargs)[source]

Computes the action. Returns the output.

graph_execution()[source]

Returns a formated string which retruns the outputs.