Why is alias U8 = Dtype.uint8 not a type?

alias U8 = DType.uint8

@inline_always
fn is_digit(value: U8) -> Bool:
return value >= 48 && value <= 57
alias U8 = DType.uint8

@inline_always
fn is_digit(value: U8) -> Bool:
return value >= 48 && value <= 57
Gives expected a type, not a value on the U8 in the function signature. What am I missing?
2 Replies
Darkmatter
Darkmatter3mo ago
You're looking for the UInt8 type. DType is an enum that is used to be generic across different types.
duck_tape
duck_tapeOP3mo ago
Ahhh, I see. Thank you!

Did you find this page helpful?