nitypes.bintime.DateTimeArray

class nitypes.bintime.DateTimeArray(value: collections.abc.Iterable[nitypes.bintime.DateTime] | None = None)

Bases: collections.abc.MutableSequence[nitypes.bintime.DateTime]

A mutable array of DateTime values in NI Binary Time Format (NI-BTF).

Raises:

TypeError – If any item in value is not a DateTime instance.

Parameters:

value (collections.abc.Iterable[nitypes.bintime.DateTime] | None)

__slots__ = ['_array']
__getitem__(index: int) nitypes.bintime.DateTime
__getitem__(index: slice) DateTimeArray

Return self[index].

Raises:
__len__() int

Return len(self).

Return type:

int

__setitem__(index: int, value: nitypes.bintime.DateTime) None
__setitem__(index: slice, value: collections.abc.Iterable[nitypes.bintime.DateTime]) None

Set a new value for DateTime at the specified location or slice.

Raises:
  • TypeError – If index is an invalid type, or slice value is not iterable.

  • ValueError – If slice assignment length doesn’t match the selected range.

  • IndexError – If index is out of range.

__delitem__(index: int) None
__delitem__(index: slice) None

Delete the value at the specified location or slice.

Raises:
insert(index: int, value: nitypes.bintime.DateTime) None

Insert the DateTime value before the specified index.

Raises:

TypeError – If index is not int or value is not DateTime.

Parameters:
Return type:

None

extend(values: collections.abc.Iterable[nitypes.bintime.DateTime]) None

Extend the array by appending the elements from values.

Parameters:

values (collections.abc.Iterable[nitypes.bintime.DateTime])

Return type:

None

__eq__(other: object) bool

Return self == other.

Parameters:

other (object)

Return type:

bool

__reduce__() tuple[Any, Ellipsis]

Return object state for pickling.

Return type:

tuple[Any, Ellipsis]

__repr__() str

Return repr(self).

Return type:

str

__str__() str

Return str(self).

Return type:

str

append(value)

S.append(value) – append value to the end of the sequence

clear()

S.clear() -> None – remove all items from S

reverse()

S.reverse() – reverse IN PLACE

pop(index=-1)

S.pop([index]) -> item – remove and return item at index (default last). Raise IndexError if list is empty or index is out of range.

remove(value)

S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.

__iadd__(values)
__abc_tpflags__ = 32
__iter__()
__contains__(value)
__reversed__()
index(value, start=0, stop=None)

S.index(value, [start, [stop]]) -> integer – return first index of value. Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

count(value)

S.count(value) -> integer – return number of occurrences of value

classmethod __subclasshook__(C)
__class_getitem__