.. _f-onnxvariable: module ``npy.onnx_variable`` ============================ .. inheritance-diagram:: mlprodict.npy.onnx_variable Short summary +++++++++++++ module ``mlprodict.npy.onnx_variable`` Intermediate class between :epkg:`numpy` and :epkg:`onnx`. Classes +++++++ +------------------------------------------------------------------+------------------------------------------------------------------+ | class | truncated documentation | +==================================================================+==================================================================+ | :class:`MultiOnnxVar ` | Class used to return multiple :class:`OnnxVar` at the same time. | +------------------------------------------------------------------+------------------------------------------------------------------+ | :class:`OnnxVar ` | Variables used into :epkg:`onnx` computation. | +------------------------------------------------------------------+------------------------------------------------------------------+ Properties ++++++++++ +----------------------------------------------------------------------------------+---------------------------------------+ | property | truncated documentation | +==================================================================================+=======================================+ | :meth:`inputs ` | Returns `self.onxvar.inputs`. | +----------------------------------------------------------------------------------+---------------------------------------+ | :meth:`onnx_op ` | Returns `self.onxvar.onnx_op`. | +----------------------------------------------------------------------------------+---------------------------------------+ | :meth:`onnx_op_kwargs ` | Returns `self.onxvar.onnx_op_kwargs`. | +----------------------------------------------------------------------------------+---------------------------------------+ | :meth:`shape ` | Shape | +----------------------------------------------------------------------------------+---------------------------------------+ | :meth:`size ` | Size | +----------------------------------------------------------------------------------+---------------------------------------+ | :meth:`T ` | Transpose. | +----------------------------------------------------------------------------------+---------------------------------------+ Methods +++++++ +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +======================================================================================+=====================================================================================================================+ | :py:meth:`__add__ ` | Addition. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__and__ ` | And. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__eq__ ` | Equality. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__floordiv__ ` | Division, no difference between `/` and `//`. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__ge__ ` | Greater or Equal. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getitem__ ` | Returns the ith elements. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getitem__ ` | Deals with multiple scenarios. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__gt__ ` | Greater. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | constructor | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__invert__ ` | not. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__le__ ` | Less or Equal. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__lt__ ` | Less. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__matmul__ ` | Matrix multiplication. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__mod__ ` | Modulo. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__mul__ ` | Multiplication. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__ne__ ` | Difference. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__neg__ ` | Neg. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__or__ ` | And. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__pow__ ` | Power. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__radd__ ` | Right Addition. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__rmul__ ` | Right multiplication. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__rsub__ ` | Right subtraction. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__rtruediv__ ` | Division, no difference between `/` and `//`. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setitem__ ` | Only supports vectors (1D tensor). | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__sub__ ` | Subtraction. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__truediv__ ` | Division, no difference between `/` and `//`. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_custom_op ` | This could be handled before a call to this method but this method can change the conversion of an non-existing ... | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_custom_op_filter ` | This could be handled before a call to this method but this method can change the conversion of an non-existing ... | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_guess_dtype ` | Guesses dtype when not specified. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_guess_dtype ` | Guesses dtype when not specified. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_make_array ` | Converts *y* into an array if not. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_setitem1i_ ` | | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_setitem2i_ ` | | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`astype ` | Cast | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`copy ` | Returns a copy of self (use of Identity node). | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`flatten ` | Flattens a matrix (see :epkg:`numpy:ndarray:flatten`). | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`not_ ` | Not. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`reshape ` | Reshape | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`set_onnx_name ` | Forces this variable to get this name during | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`to_algebra ` | Converts the variable into an operator. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :meth:`to_algebra ` | Converts the variable into an operator. | +--------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.npy.onnx_variable :members: :special-members: __init__ :show-inheritance: