Coverage for mlprodict/onnxrt/ops_cpu/op_sequence_at.py: 81%
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
Shortcuts on this page
r m x toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# -*- encoding: utf-8 -*-
2# pylint: disable=E0203,E1101,C0111
3"""
4@file
5@brief Runtime operator.
7.. versionadded:: 0.8
8"""
9from ._op import OpRun
10from ..shape_object import ShapeObject
13class SequenceAt(OpRun):
15 atts = {}
17 def __init__(self, onnx_node, desc=None, **options):
18 OpRun.__init__(self, onnx_node, desc=desc,
19 atts=SequenceAt.atts, **options)
21 def _run(self, seq, index): # pylint: disable=W0221
22 return (seq[index], )
24 def _infer_shapes(self, seq, index): # pylint: disable=W0221
25 return (ShapeObject(None, dtype=seq.subtype.dtype), )
27 def _infer_types(self, *data): # pylint: disable=W0221
28 return (None, )
30 def _infer_sizes(self, *args): # pylint: disable=W0221
31 res = self.run(*args)
32 return (dict(temp=0), ) + res