module onnxrt.ops_cpu.op_zipmap#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_zipmap

Short summary#

module mlprodict.onnxrt.ops_cpu.op_zipmap

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

ArrayZipMapDictionary

Mocks an array without changing the data it receives. Notebooks Time processing for every ONNX nodes in a graph illustrates the weaknesses …

ZipMap

The class does not output a dictionary as specified in ONNX specifications but a ArrayZipMapDictionary

ZipMapDictionary

Custom dictionary class much faster for this runtime, it implements a subset of the same methods.

Properties#

property

truncated documentation

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default_modified

Returns the list of modified parameters.

args_mandatory

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

atts_value

Returns all parameters in a dictionary.

columns

Equivalent to DataFrame(self).columns.

dtype

is_zip_map

values

Equivalent to DataFrame(self).values.

Static Methods#

staticmethod

truncated documentation

build_rev_keys

Methods#

method

truncated documentation

__contains__

__getitem__

__getitem__

Returns the item mapped to keys.

__getstate__

For pickle.

__init__

__init__

__init__

__iter__

__iter__

__len__

__len__

Returns the number of items.

__setitem__

__setitem__

unused but used by pickle

__setstate__

For pickle.

__str__

__str__

_infer_shapes

_infer_types

Returns the same shape by default.

_run

asdict

items

keys

values

Documentation#

Runtime operator.

source on GitHub

class mlprodict.onnxrt.ops_cpu.op_zipmap.ArrayZipMapDictionary(rev_keys, mat)#

Bases: list

Mocks an array without changing the data it receives. Notebooks Time processing for every ONNX nodes in a graph illustrates the weaknesses and the strengths of this class compare to a list of dictionaries.

source on GitHub

Parameters:
  • rev_keys – dictionary {keys: column index}

  • mat – matrix if values is a row index, one or two dimensions

source on GitHub

__getitem__(i)#

x.__getitem__(y) <==> x[y]

__init__(rev_keys, mat)#
Parameters:
  • rev_keys – dictionary {keys: column index}

  • mat – matrix if values is a row index, one or two dimensions

source on GitHub

__iter__()#

Implement iter(self).

__len__()#

Return len(self).

__setitem__(pos, value)#

Set self[key] to value.

__str__()#

Return str(self).

property columns#

Equivalent to DataFrame(self).columns.

source on GitHub

property values#

Equivalent to DataFrame(self).values.

source on GitHub

class mlprodict.onnxrt.ops_cpu.op_zipmap.ZipMap(onnx_node, desc=None, **options)#

Bases: OpRun

The class does not output a dictionary as specified in ONNX specifications but a ArrayZipMapDictionary which is wrapper on the input so that it does not get copied.

source on GitHub

__init__(onnx_node, desc=None, **options)#
_infer_shapes(x)#

Should be overwritten.

source on GitHub

_infer_types(x)#

Returns the same shape by default.

source on GitHub

_run(x, attributes=None, verbose=0, fLOG=None)#

Should be overwritten.

source on GitHub

class mlprodict.onnxrt.ops_cpu.op_zipmap.ZipMapDictionary(rev_keys, values, mat=None)#

Bases: dict

Custom dictionary class much faster for this runtime, it implements a subset of the same methods.

source on GitHub

Parameters:
  • rev_keys – returns by build_rev_keys, {keys: column index}

  • values – values

  • mat – matrix if values is a row index, one or two dimensions

source on GitHub

__contains__(key)#

True if the dictionary has the specified key, else False.

__getitem__(key)#

Returns the item mapped to keys.

source on GitHub

__getstate__()#

For pickle.

source on GitHub

__init__(rev_keys, values, mat=None)#
Parameters:
  • rev_keys – returns by build_rev_keys, {keys: column index}

  • values – values

  • mat – matrix if values is a row index, one or two dimensions

source on GitHub

__iter__()#

Implement iter(self).

__len__()#

Returns the number of items.

source on GitHub

__setitem__(pos, value)#

unused but used by pickle

__setstate__(state)#

For pickle.

source on GitHub

__slots__ = ['_rev_keys', '_values', '_mat']#
__str__()#

Return str(self).

_mat#
_rev_keys#
_values#
items() a set-like object providing a view on D's items#
keys() a set-like object providing a view on D's keys#
values() an object providing a view on D's values#