How to create a position-color structure array?

I want to create an array that contains position (x,y) and color (r, g, b) values in it like the below:

[(0.91712032, 0.50404937,   9, 243, 133)
 (0.42529759, 0.81359783,  51,   0, 108)
 (0.05207596, 0.34303168, 191, 196, 103)]

Can you provide me with a code that helps me generate the above array?

Hey @safa , In NumPy there is a function zeros() that is used to create an array filled with zeros. The zeros() function takes a tuple or a list as an argument that specifies the shape of the array to be created. It also takes an optional parameter called dtype, which specifies the data type of the elements in the array. The zeros() function returns an array of the specified shape, filled with zeros of the specified data type. let’s see the example given below to gain better understanding.