# loading libraries  
import numpy as np

# Define the data types for the structured array
dt = np.dtype([('x', 'float'), ('y', 'float'), 
      ('r', 'int'), ('g', 'int'), ('b', 'int')])

# Create an empty structured array with 3 rows
array = np.empty((3,), dtype=dt)

# 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)