def add_3dim(pos2d, plane, offset=None):
    '''

    Parameters
    ----------
    plane

    Returns
    -------

    '''
    nelec = pos2d.shape[0]
    if plane == 'xy':
        pos = np.hstack((pos2d, offset * np.ones((nelec, 1))))
    elif plane == 'yz':
        pos = np.hstack((offset * np.ones((nelec, 1)), pos2d))
    elif plane == 'xz':
        pos = np.hstack((pos2d, offset * np.ones((nelec, 1))))
        pos[:, [0, 1, 2]] = pos[:, [0, 2, 1]]
    return pos
def add_3dim ( pos2d , plane , offset = None ) : nelec = pos2d . shape [ 0 ] if plane == 'xy' : pos = np . hstack ( ( pos2d , offset * np . ones ( ( nelec , 1 ) ) ) ) elif plane == 'yz' : pos = np . hstack ( ( offset * np . ones ( ( nelec , 1 ) ) , pos2d ) ) elif plane == 'xz' : pos = np . hstack ( ( pos2d , offset * np . ones ( ( nelec , 1 ) ) ) ) pos [ : , [ 0 , 1 , 2 ] ] = pos [ : , [ 0 , 2 , 1 ] ] return pos
Parameters
    ----------
    plane

    Returns
    -------