module npy.numpy_onnx_impl_body#

Inheritance diagram of mlprodict.npy.numpy_onnx_impl_body

Short summary#

module mlprodict.npy.numpy_onnx_impl_body

Design to implement graph as parameter.

Classes#

class

truncated documentation

AttributeGraph

Class wrapping a function to make it simple as a parameter.

if_then_else

Overloads class OnnxVarGraph.

OnnxVarGraph

Overloads OnnxVar to handle graph attribute.

Properties#

property

truncated documentation

shape

Shape

size

Size

T

Transpose.

Methods#

method

truncated documentation

__init__

__init__

__init__

__repr__

usual

__repr__

usual

_graph_guess_dtype

Guesses the graph inputs.

_graph_guess_dtype

Guesses the graph inputs.

to_algebra

Converts the variable into an operator.

to_algebra

Converts the variable into an operator.

to_algebra

Converts the variable into an operator.

Documentation#

Design to implement graph as parameter.

New in version 0.8.

source on GitHub

class mlprodict.npy.numpy_onnx_impl_body.AttributeGraph(fct, *inputs)#

Bases: object

Class wrapping a function to make it simple as a parameter.

Parameters:
  • fct – function taking the list of inputs defined as OnnxVar, the function returns an OnnxVar

  • inputs – list of input as OnnxVar

New in version 0.8.

source on GitHub

__init__(fct, *inputs)#
__repr__()#

usual

_graph_guess_dtype(i, var)#

Guesses the graph inputs.

Parameters:
  • i – attribute index (integer)

  • var – the input (OnnxVar)

Returns:

input type

source on GitHub

to_algebra(op_version=None)#

Converts the variable into an operator.

source on GitHub

class mlprodict.npy.numpy_onnx_impl_body.OnnxVarGraph(*inputs, op=None, select_output=None, dtype=None, **kwargs)#

Bases: OnnxVar

Overloads OnnxVar to handle graph attribute.

Parameters:
  • inputs – variable name or object

  • opONNX operator

  • select_output – if multiple output are returned by ONNX operator op, it takes only one specifed by this argument

  • dtype – specifies the type of the variable held by this class (op is None) in that case

  • fields – list of attributes with the graph type

  • kwargs – addition argument to give operator op

New in version 0.8.

source on GitHub

__init__(*inputs, op=None, select_output=None, dtype=None, **kwargs)#
to_algebra(op_version=None)#

Converts the variable into an operator.

source on GitHub

class mlprodict.npy.numpy_onnx_impl_body.if_then_else(fct, *inputs)#

Bases: AttributeGraph

Overloads class OnnxVarGraph.

source on GitHub

__init__(fct, *inputs)#