def METHOD_NAME(expression, coor):
    x = coor[:, 0]
    y = coor[:, 1]
    if coor.shape[1] == 3:
        z = coor[:, 2]
    else:
        z = None
    env = {'x' : x, 'y' : y, 'z' : z}
    out = eval(expression, nm.__dict__, env)
    if isinstance(out, float):
        aux = nm.empty(coor.shape[0], dtype=nm.float64)
        aux.fill(out)
        out = aux
    return out