module grammar.gtypes

Inheritance diagram of mlprodict.grammar.gtypes

Short summary

module mlprodict.grammar.gtypes

Types definition.

source on GitHub

Classes

class

truncated documentation

MLNumType

Base class for numerical types.

MLNumTypeBool

A numpy.bool.

MLNumTypeFloat32

A numpy.float32.

MLNumTypeInt32

A numpy.int32.

MLNumTypeSingle

int32 or float32

MLTensor

Defines a tensor with a dimension and a single type for what it contains.

MLType

Base class for every type.

Properties

property

truncated documentation

CTypeSingle

Returns ctype.

CTypeSingle

Returns ctype.

CTypeSingle

Returns ctype.

CTypeSingle

Returns ctype.

CTypeSingle

Returns ctype.

Methods

method

truncated documentation

__init__

__init__

__init__

__init__

__init__

_byref_c

_byref_c

_byref_c

_byref_c

_byref_c

_copy_c

_copy_c

_copy_c

_copy_c

_copy_c

_copy_c

_export_c

_export_c

_export_c

_export_c

_export_c

_export_common_c

_export_common_c

_export_common_c

_export_common_c

_export_json

_export_json

_export_json

_export_json

_export_json

_format_value_c

_format_value_c

_format_value_c

_format_value_c

_format_value_c

_format_value_c

_format_value_json

_format_value_json

_format_value_json

_format_value_json

_format_value_json

_format_value_json

cast

Converts value into this type.

cast

Exports value into this type.

cast

Exports value into this type.

cast

Exports value into this type.

cast

Exports value into this type.

cast

Converts value into this type.

cast

Converts value into this type.

softcast

Exports value into this type, does it anyway without verification.

softcast

Exports value into this type, does it anyway without verification.

softcast

Exports value into this type, does it anyway without verification.

softcast

Exports value into this type, does it anyway without verification.

validate

Checks that the value is of this type.

validate

Checks that the value is of this type.

validate

Checks that the value is of this type.

validate

Checks that the value is of this type.

validate

Checks that the value is of this type.

validate

Checks that the value is of this type.

validate

Checks that the value is of this type.

Documentation

Types definition.

source on GitHub

class mlprodict.grammar.gtypes.MLNumType[source]

Bases: mlprodict.grammar.gtypes.MLType

Base class for numerical types.

source on GitHub

_copy_c(src, dst, hook=None)[source]
_format_value_c(value, hook=None)[source]
_format_value_json(value, hook=None)[source]
class mlprodict.grammar.gtypes.MLNumTypeBool[source]

Bases: mlprodict.grammar.gtypes.MLNumTypeSingle

A numpy.bool.

source on GitHub

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

class mlprodict.grammar.gtypes.MLNumTypeFloat32[source]

Bases: mlprodict.grammar.gtypes.MLNumTypeSingle

A numpy.float32.

source on GitHub

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

class mlprodict.grammar.gtypes.MLNumTypeInt32[source]

Bases: mlprodict.grammar.gtypes.MLNumTypeSingle

A numpy.int32.

source on GitHub

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

class mlprodict.grammar.gtypes.MLNumTypeSingle(numpy_type, name, ctype, key)[source]

Bases: mlprodict.grammar.gtypes.MLNumType

int32 or float32

source on GitHub

property CTypeSingle

Returns ctype.

source on GitHub

__init__(numpy_type, name, ctype, key)[source]

Initialize self. See help(type(self)) for accurate signature.

_byref_c()[source]
_export_c(hook=None, result_name=None)[source]
_export_common_c(ctype, hook=None, result_name=None)[source]
_export_json(hook=None, result_name=None)[source]
_format_value_c(value, hook=None)[source]
_format_value_json(value, hook=None)[source]
cast(value)[source]

Exports value into this type.

source on GitHub

softcast(value)[source]

Exports value into this type, does it anyway without verification.

source on GitHub

validate(value)[source]

Checks that the value is of this type.

source on GitHub

class mlprodict.grammar.gtypes.MLTensor(element_type, dim)[source]

Bases: mlprodict.grammar.gtypes.MLType

Defines a tensor with a dimension and a single type for what it contains.

source on GitHub

property CTypeSingle

Returns ctype.

source on GitHub

__init__(element_type, dim)[source]

Initialize self. See help(type(self)) for accurate signature.

_byref_c()[source]
_copy_c(src, dest, hook=None)[source]
_export_c(hook=None, result_name=None)[source]
_export_json(hook=None, result_name=None)[source]
_format_value_c(value, hook=None)[source]
_format_value_json(value, hook=None)[source]
validate(value)[source]

Checks that the value is of this type.

source on GitHub

class mlprodict.grammar.gtypes.MLType[source]

Bases: mlprodict.grammar.api_extension.AutoType

Base class for every type.

source on GitHub

cast(value)[source]

Converts value into this type.

source on GitHub

validate(value)[source]

Checks that the value is of this type.

source on GitHub