U32Array#
- class vulkpy.U32Array#
Bases:
_GPUArrayGPU Array of uint (32bit) for shape or indices
See also
vulkpy.Arrayfloat (32bit) array supporing mathematical operation
Warning
U32Array doesn’t support any mathematical operation. This class is designed for indexing and class label.
Methods Summary
Methods Documentation
- flush()#
Flush Buffer to GPU
- to_onehot(num_classes: int) Array#
Convert to one hot vector
- Parameters:
num_classes (int) – Number of classes
- Returns:
One hot vector
- Return type:
- wait()#
Wait Last Job
- __init__(gpu: GPU, *, data: Iterable[int] | None = None, shape: Iterable[int] | None = None)#
Initialize U32Array
- Parameters:
data (iterable of ints, optional) – Data to be copied.
shape (iterable of ints, optional) – Shape for uninitialized array. If
datais notNone,shapeis ignored.
- Raises:
ValueError – If neither
datanorshapeis specified.