_pyngraph.Dimension

class _pyngraph.Dimension

Bases: pybind11_builtins.pybind11_object

ngraph.impl.Dimension wraps ngraph::Dimension

__init__(*args, **kwargs)

Overloaded function.

  1. __init__(self: _pyngraph.Dimension) -> None

  2. __init__(self: _pyngraph.Dimension, dimension: int) -> None

    Construct a static dimension.

    dimensionint

    Value of the dimension.

  3. __init__(self: _pyngraph.Dimension, min_dimension: int, max_dimension: int) -> None

    Construct a dynamic dimension with bounded range.

    min_dimensionint

    The lower inclusive limit for the dimension.

    max_dimensionint

    The upper inclusive limit for the dimension.

Methods

__init__(*args, **kwargs)

Overloaded function.

compatible(self, d)

Check whether this dimension is capable of being merged with the argument dimension.

dynamic()

get_length(self)

Return this dimension as integer.

get_max_length(self)

Return this dimension's max_dimension as integer.

get_min_length(self)

Return this dimension's min_dimension as integer.

refines(self, d)

Check whether this dimension is a refinement of the argument.

relaxes(self, d)

Check whether this dimension is a relaxation of the argument.

same_scheme(self, dim)

Return this dimension's max_dimension as integer.

Attributes

is_dynamic

Check if Dimension is dynamic.

is_static

Check if Dimension is static.

compatible(self: _pyngraph.Dimension, d: _pyngraph.Dimension) bool

Check whether this dimension is capable of being merged with the argument dimension.

dDimension

The dimension to compare this dimension with.

compatiblebool

True if this dimension is compatible with d, else False.

static dynamic() _pyngraph.Dimension
get_length(self: _pyngraph.Dimension) int

Return this dimension as integer. This dimension must be static and non-negative.

get_lengthint

Value of the dimension.

get_max_length(self: _pyngraph.Dimension) int

Return this dimension’s max_dimension as integer. This dimension must be dynamic and non-negative.

get_max_lengthint

Value of the dimension.

get_min_length(self: _pyngraph.Dimension) int

Return this dimension’s min_dimension as integer. This dimension must be dynamic and non-negative.

get_min_lengthint

Value of the dimension.

property is_dynamic

Check if Dimension is dynamic.

is_dynamicbool

True if dynamic, else False.

property is_static

Check if Dimension is static.

is_staticbool

True if static, else False.

refines(self: _pyngraph.Dimension, d: _pyngraph.Dimension) bool

Check whether this dimension is a refinement of the argument. This dimension refines (or is a refinement of) d if:

  1. this and d are static and equal

  2. d dimension contains this dimension

this.refines(d) is equivalent to d.relaxes(this).

dDimension

The dimension to compare this dimension with.

relaxesbool

True if this dimension refines d, else False.

relaxes(self: _pyngraph.Dimension, d: _pyngraph.Dimension) bool

Check whether this dimension is a relaxation of the argument. This dimension relaxes (or is a relaxation of) d if:

  1. this and d are static and equal

  2. this dimension contains d dimension

this.relaxes(d) is equivalent to d.refines(this).

dDimension

The dimension to compare this dimension with.

relaxesbool

True if this dimension relaxes d, else False.

same_scheme(self: _pyngraph.Dimension, dim: _pyngraph.Dimension) bool

Return this dimension’s max_dimension as integer. This dimension must be dynamic and non-negative.

dimDimension

The other dimension to compare this dimension to.

same_schemebool

True if this dimension and dim are both dynamic, or if they are both static and equal, otherwise False.