Coverage for mlprodict/onnxrt/ops_empty/__init__.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.1.0, created at 2023-02-04 02:28 +0100

1# -*- encoding: utf-8 -*- 

2""" 

3@file 

4@brief Shortcut to *ops_cpu*. 

5""" 

6from ._op import OpRunOnnxEmpty 

7 

8 

9def load_op(onnx_node, desc=None, options=None, variables=None, dtype=None): 

10 """ 

11 Gets the operator related to the *onnx* node. 

12 This runtime does nothing and never complains. 

13 

14 :param onnx_node: :epkg:`onnx` node 

15 :param desc: internal representation 

16 :param options: runtime options 

17 :param variables: registered variables created by previous operators 

18 :param dtype: float computation type 

19 :return: runtime class 

20 """ 

21 if desc is None: 

22 raise ValueError( # pragma: no cover 

23 "desc should not be None.") 

24 return OpRunOnnxEmpty(onnx_node, desc, variables=variables, 

25 dtype=dtype, **options)