N = 1000
cords = np.random.randint(3, 7, (N, 3))
atoms = np.random.choice(list('HC'), N)
atom_proj = {'H': np.array([[0, 0, 0, 0, 0], [0, 0, 1, 0, 0], [0, 1, 1, 1, 
    0], [0, 0, 1, 0, 0], [0, 0, 0, 0, 0]]), 'C': np.array([[0, 0, 0, 0, 0, 
    0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0,
    0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]])}

def project_atom(cords, atoms, atom_proj):
    extruded = np.zeros((N, 10, 10))
extruded[list(range(N)), cords[:, (2)], cords[:, (0)]] = 1
grid = np.zeros((10, 10))
Проецирование координат в массиве Numpy