# loading libraries
import numpy as np
# Create a zeros array with fields 'x', 'y', 'r', 'g', 'b'
array = np.zeros((3,), dtype=[('x', 'float'), ('y', 'float'),
('r', 'int'), ('g', 'int'), ('b','int')])
# Fill in some data
array['x'] = np.random.rand(3)
array['y'] = np.random.rand(3)
array['r'] = np.random.randint(0, 255, 3)
array['g'] = np.random.randint(0, 255, 3)
array['b'] = np.random.randint(0, 255, 3)
print(array)