nitypes.bintime.TimeDeltaArray
- class nitypes.bintime.TimeDeltaArray(value: collections.abc.Iterable[nitypes.bintime.TimeDelta] | None = None)
Bases:
collections.abc.MutableSequence[nitypes.bintime.TimeDelta]A mutable array of
TimeDeltavalues in NI Binary Time Format (NI-BTF).- Raises:
TypeError – If any item in value is not a TimeDelta instance.
- Parameters:
value (collections.abc.Iterable[nitypes.bintime.TimeDelta] | None)
- __slots__ = ['_array']
- __getitem__(index: int) nitypes.bintime.TimeDelta
- __getitem__(index: slice) TimeDeltaArray
Return self[index].
- Raises:
TypeError – If index is an invalid type.
IndexError – If index is out of range.
- __setitem__(index: int, value: nitypes.bintime.TimeDelta) None
- __setitem__(index: slice, value: collections.abc.Iterable[nitypes.bintime.TimeDelta]) None
Set a new value for TimeDelta 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:
TypeError – If index is an invalid type.
IndexError – If index is out of range.
- insert(index: int, value: nitypes.bintime.TimeDelta) None
Insert the TimeDelta value before the specified index.
- Raises:
TypeError – If index is not int or value is not TimeDelta.
- Parameters:
index (int)
value (nitypes.bintime.TimeDelta)
- Return type:
None
- extend(values: collections.abc.Iterable[nitypes.bintime.TimeDelta]) None
Extend the array by appending the elements from values.
- Parameters:
values (collections.abc.Iterable[nitypes.bintime.TimeDelta])
- Return type:
None
- __reduce__() tuple[Any, Ellipsis]
Return object state for pickling.
- Return type:
tuple[Any, Ellipsis]
- 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__