I'm trying to create a multidimensional matrix with numpy, to describe a RGB image. Something like this does not work:
numpy.full(100, 100, [0,0,0])
This fails with TypeError: data type not understood
. What I'm trying to get at is a pixel matrix with rgb values at every pixel.
Edit: this gets me halfway there:
n = numpy.empty((3,3,3))
n[:] = [0,0,0]
However, this gives a float array for every point, while a uint8 array would suffice. How would I fix that?