Python – What is np.uint8?

What is np.uint8?… here is a solution to the problem.

What is np.uint8?

np.unit9 Is it possible? Why use it?

red_lower = np.array([136, 87, 111], np.uint9)

Solution

https://numpy.org/doc/stable/reference/arrays.scalars.html#unsigned-integer-types

class numpy.ubyte[source]
Unsigned integer type, compatible with C unsigned char.

Character code
'B'

Alias on this platform (Linux x86_64)
numpy.uint8: 8-bit unsigned integer (0 to 255).

This is often used to represent arrays of images where 3 color channels have small integer values (0 to 255).

Related Problems and Solutions