.. _f-onnxnumpywrapper: module ``npy.onnx_numpy_wrapper`` ================================= .. inheritance-diagram:: mlprodict.npy.onnx_numpy_wrapper Short summary +++++++++++++ module ``mlprodict.npy.onnx_numpy_wrapper`` Wraps :epkg:`numpy` functions into :epkg:`onnx`. Classes +++++++ +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +=======================================================================================+================================================================================================================================+ | :class:`_created_classes ` | Class to store all dynamic classes created by wrappers. | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :class:`wrapper_onnxnumpy ` | Intermediate wrapper to store a pointer on the compiler (type: :class:`OnnxNumpyCompiler`). | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :class:`wrapper_onnxnumpy_np ` | Intermediate wrapper to store a pointer on the compiler (type: :class:`OnnxNumpyCompiler`) supporting multiple signatures. ... | +---------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ Functions +++++++++ +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +================================================================================+========================================================================================================================+ | :func:`onnxnumpy ` | Decorator to declare a function implemented using :epkg:`numpy` syntax but executed with :epkg:`ONNX` operators. ... | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :func:`onnxnumpy_default ` | Decorator with options to declare a function implemented using :epkg:`numpy` syntax but executed with :epkg:`ONNX` ... | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :func:`onnxnumpy_np ` | Decorator to declare a function implemented using :epkg:`numpy` syntax but executed with :epkg:`ONNX` operators. ... | +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ Methods +++++++ +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +============================================================================================================+============================================================================================================================+ | :py:meth:`__call__ ` | Calls the compiled function with arguments `args`. | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__call__ ` | Calls the compiled function assuming the type of the first tensor in *args* defines the templated version of the ... | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getitem__ ` | Returns the instance of :class:`wrapper_onnxnumpy` mapped to *dtype*. | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getstate__ ` | Serializes everything but the function which generates the ONNX graph, not needed anymore. | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getstate__ ` | Serializes everything but the function which generates the ONNX graph, not needed anymore. | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | Serializes everything but the function which generates the ONNX graph, not needed anymore. | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | Restores serialized data. | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_populate ` | Creates the appropriate runtime for function *fct* | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_validate_onnx_data ` | | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :meth:`append ` | Adds a class into `globals()` to enable pickling on dynamic classes. | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx ` | Returns the ONNX graph for the wrapped function. It takes additional arguments to distinguish between multiple graphs. ... | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx ` | Returns the ONNX graph for the wrapped function. It takes additional arguments to distinguish between multiple graphs. ... | +------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.npy.onnx_numpy_wrapper :members: :special-members: __init__ :show-inheritance: