npx.npx_types#

Annotations#

class onnx_array_api.npx.npx_types.ElemType[source]#

Allowed element type based on numpy dtypes.

Parameters:

dtype – integer or a string

classmethod get_set_name(dtypes)[source]#

Returns the set name.

classmethod type_name() str[source]#

Returns its fullname.

class onnx_array_api.npx.npx_types.ParType[source]#

Defines a parameter type.

Parameters:
  • dtype – parameter type

  • optional – is optional or not

classmethod onnx_type()[source]#

Returns the onnx corresponding type.

classmethod type_name() str[source]#

Returns its full name.

class onnx_array_api.npx.npx_types.OptParType[source]#

Defines an optional parameter type.

Parameters:

dtype – parameter type

classmethod type_name() str[source]#

Returns its full name.

class onnx_array_api.npx.npx_types.TensorType[source]#

Used to annotate functions.

Parameters:
  • dtypes – tuple of ElemType

  • shape – tuple of integer or strings or None

  • name – name of the type

classmethod issuperset(tensor_type: type) bool[source]#

Tells if cls is a superset of tensor_type.

classmethod type_name() str[source]#

Returns its full name.

class onnx_array_api.npx.npx_types.SequenceType[source]#

Defines a sequence of tensors.

classmethod type_name() str[source]#

Returns its full name.

class onnx_array_api.npx.npx_types.TupleType[source]#

Defines a sequence of tensors.

classmethod len()[source]#

Returns the number of types.

classmethod type_name() str[source]#

Returns its full name.

Shortcuts#

class onnx_array_api.npx.npx_types.Bool#
class onnx_array_api.npx.npx_types.BFloat16#
class onnx_array_api.npx.npx_types.Float16#
class onnx_array_api.npx.npx_types.Float32#
onnx_array_api.npx.npx_types.Float64#

alias of Float32

onnx_array_api.npx.npx_types.Int8#

alias of int8

onnx_array_api.npx.npx_types.Int16#

alias of int16

onnx_array_api.npx.npx_types.Int32#

alias of int32

onnx_array_api.npx.npx_types.Int64#

alias of int64

onnx_array_api.npx.npx_types.UInt8#

alias of uint8

onnx_array_api.npx.npx_types.UInt16#

alias of uint16

onnx_array_api.npx.npx_types.UInt32#

alias of uint32

onnx_array_api.npx.npx_types.UInt64#

alias of uint64