original_docstring: Convert a path to a 3D segment.
docstring: Convert a path to a 3D segment.
docstring_tokens: Convert a path to a 3D segment .
code: def path_to_3d_segment(path, zs=0, zdir='z'):
      """Convert a path to a 3D segment."""
  
      zs = np.broadcast_to(zs, len(path))
      pathsegs = path.iter_segments(simplify=False, curves=False)
      seg = [(x, y, z) for (((x, y), code), z) in zip(pathsegs, zs)]
      seg3d = [juggle_axes(x, y, z, zdir) for (x, y, z) in seg]
      return seg3d
code_tokens: def path_to_3d_segment ( path , zs = 0 , zdir = 'z' ) : zs = np . broadcast_to ( zs , len ( path ) ) pathsegs = path . iter_segments ( simplify = False , curves = False ) seg = [ ( x , y , z ) for ( ( ( x , y ) , code ) , z ) in zip ( pathsegs , zs ) ] seg3d = [ juggle_axes ( x , y , z , zdir ) for ( x , y , z ) in seg ] return seg3d
short_docstring: Convert a path to a 3D segment.
short_docstring_tokens: Convert a path to a 3D segment .
comment: """Convert a path to a 3D segment."""