Array¶
-
class
Array(val: tuple = None)¶ Bases:
listGeneric container datatype that holds N instances of type T
Concrete data type is obtained by indexing:
u16_4 = Array[Uint[16], 4]
-
copy()¶ Return a shallow copy of the list.
-
-
class
ArrayType¶ Bases:
pygears.typing.base.EnumerableGenericMeta-
keys()¶ Returns a list of keys that can be used for indexing
Array[T, N] type. Number of keys equals to the number of elements N.>>> Array[Uint[2], 5].keys() [0, 1, 2, 3, 4]
-
property
width¶ Calculates the bit width of the type.
>>> int(Tuple[Uint[1], Uint[2]]) 3
-