Skip to content
Back to top
View this page

# ValueXArray

class dsviper.ValueXArray

  Bases: `object`

  A class used to represent a value of type xarray<element_type>. Seamless with a Python seq[object].

  Or use Value.create(type_xarray [, initial_value]).

  END = 00000000-0000-0000-0000-000000000000
  append(value: _InputValues) → ValueUUId

    Append value to the end.

  at(position: ValueUUId, *, encoded: bool = True) → _OutputValues | None

    Return the element at the position or None.

  static cast(value: Value) → ValueXArray

    Return a xarray<element_type> or raise.

  copy() → ValueXArray

    Return a deep copy.

  static create_position() → ValueUUId

    Create and return a position.

  description(*, namespace: NameSpace | None = None) → str

    Return the description.

  disable_position(position: ValueUUId) → None

    Disable the position.

  extend(values: Sequence | ValueVector) → ValueUUId

    Extend by appending the values.

  has_position(position: ValueUUId) → bool

    Return True if the position exists.

  hash() → int

    Return the hash value.

  index(position: ValueUUId) → int | None

    Return the index of the position.

  insert(before_position: ValueUUId, value: _InputValues, new_position: ValueUUId | None = None) → ValueUUId

    Insert the value before_position and return the new position. Use new_position if specified, else a new position is created.

  insert_position(before_position: ValueUUId, new_position: ValueUUId) → None

    Insert before_position a new_position.

  items() → list[tuple[ValueUUId, Value]]

    Return the list of positions with a value.

  position(index: int) → ValueUUId | None

    Return the position for the index or None.

  position_of(value: _InputValues) → ValueUUId | None

    Return the position of the value or None.

  positions() → list[ValueUUId]

    Return the list of positions.

  remove(position: ValueUUId) → None

    Remove the element at the position.

  representation() → str

    Return the representation.

  set(position: ValueUUId, value: _InputValues)

    Set the value at the position.

  to_vector() → ValueVector

    Convert to a vector<element_type>.

  type() → Type

    Return the type.

  type_code() → str

    Return the type code.

  type_xarray() → TypeXArray

    Return the type xarray<element_type>.