let p = DTypePointer[DType.ui8].alloc(8)
let x = Buffer8, DType.ui8
Error:
Expression [21]:21:31: 'DType' value has no attribute 'ui8'
let p = DTypePointer[DType.ui8].alloc(8)
Expression [21]:22:28: 'DType' value has no attribute 'ui8'
let x = Buffer[8, DType.ui8](p)
~~~~~^~~~
Suggested Solution:
let p = DTypePointer[DType.uint8].alloc(8)
let x = Buffer[8, DType.uint8](p)
Explanation:
The error occurs because the attribute ui8 does not exist in the DType class. The correct attribute to use is uint8 instead. By replacing DType.ui8 with DType.uint8, the code should work as intended.
let p = DTypePointer[DType.ui8].alloc(8) let x = Buffer8, DType.ui8
Error:
Expression [21]:21:31: 'DType' value has no attribute 'ui8' let p = DTypePointer[DType.ui8].alloc(8)