class_docstr: :class:`Path` represents a series of possibly disconnected,
  possibly closed, line and curve segments.
  
  The underlying storage is made up of two parallel numpy arrays:
    - *vertices*: an Nx2 float array of vertices
    - *codes*: an N-length uint8 array of vertex types
  
  These two arrays always have the same length in the first
  dimension.  For example, to represent a cubic curve, you must
  provide three vertices as well as three codes ``CURVE3``.
  
  The code types are:
  
     - ``STOP``   :  1 vertex (ignored)
         A marker for the end of the entire path (currently not
         required and ignored)
  
     - ``MOVETO`` :  1 vertex
          Pick up the pen and move to the given vertex.
  
     - ``LINETO`` :  1 vertex
          Draw a line from the current position to the given vertex.
  
     - ``CURVE3`` :  1 control point, 1 endpoint
        Draw a quadratic Bezier curve from the current position,
        with the given control point, to the given end point.
  
     - ``CURVE4`` :  2 control points, 1 endpoint
        Draw a cubic Bezier curve from the current position, with
        the given control points, to the given end point.
  
     - ``CLOSEPOLY`` : 1 vertex (ignored)
        Draw a line segment to the start point of the current
        polyline.
  
  Users of Path objects should not access the vertices and codes
  arrays directly.  Instead, they should use :meth:`iter_segments`
  or :meth:`cleaned` to get the vertex/code pairs.  This is important,
  since many :class:`Path` objects, as an optimization, do not store a
  *codes* at all, but have a default one provided for them by
  :meth:`iter_segments`.
  
  Some behavior of Path objects can be controlled by rcParams. See
  the rcParams whose keys contain 'path.'.
  
  .. note::
  
      The vertices and codes arrays should be treated as
      immutable -- there are a number of optimizations and assumptions
      made up front in the constructor that will not change when the
      data changes.
class_docstr_tok: [":","class",":","`","Path","`","represents","a","series","of","possibly","disconnected",",","possibly","closed",",","line","and","curve","segments",".","The","underlying","storage","is","made","up","of","two","parallel","numpy","arrays",":","-","*","vertices","*",":","an","Nx2","float","array","of","vertices","-","*","codes","*",":","an","N-length","uint8","array","of","vertex","types","These","two","arrays","always","have","the","same","length","in","the","first","dimension",".","For","example",",","to","represent","a","cubic","curve",",","you","must","provide","three","vertices","as","well","as","three","codes","``","CURVE3","``",".","The","code","types","are",":","-","``","STOP","``",":","1","vertex","(","ignored",")","A","marker","for","the","end","of","the","entire","path","(","currently","not","required","and","ignored",")","-","``","MOVETO","``",":","1","vertex","Pick","up","the","pen","and","move","to","the","given","vertex",".","-","``","LINETO","``",":","1","vertex","Draw","a","line","from","the","current","position","to","the","given","vertex",".","-","``","CURVE3","``",":","1","control","point",",","1","endpoint","Draw","a","quadratic","Bezier","curve","from","the","current","position",",","with","the","given","control","point",",","to","the","given","end","point",".","-","``","CURVE4","``",":","2","control","points",",","1","endpoint","Draw","a","cubic","Bezier","curve","from","the","current","position",",","with","the","given","control","points",",","to","the","given","end","point",".","-","``","CLOSEPOLY","``",":","1","vertex","(","ignored",")","Draw","a","line","segment","to","the","start","point","of","the","current","polyline",".","Users","of","Path","objects","should","not","access","the","vertices","and","codes","arrays","directly",".","Instead",",","they","should","use",":","meth",":","`","iter_segments","`","or",":","meth",":","`","cleaned","`","to","get","the","vertex\/code","pairs",".","This","is","important",",","since","many",":","class",":","`","Path","`","objects",",","as","an","optimization",",","do","not","store","a","*","codes","*","at","all",",","but","have","a","default","one","provided","for","them","by",":","meth",":","`","iter_segments","`",".","Some","behavior","of","Path","objects","can","be","controlled","by","rcParams",".","See","the","rcParams","whose","keys","contain","'path.","'",".","..","note",":",":","The","vertices","and","codes","arrays","should","be","treated","as","immutable","--","there","are","a","number","of","optimizations","and","assumptions","made","up","front","in","the","constructor","that","will","not","change","when","the","data","changes","."]
docstr: Return a :class:`Path` instance for a unit regular
  polygon with the given *numVertices* and radius of 1.0,
  centered at (0, 0).
docstr_tok: ["Return","a",":","class",":","`","Path","`","instance","for","a","unit","regular","polygon","with","the","given","*","numVertices","*","and","radius","of","1.0",",","centered","at","(","0",",","0",")","."]
code: def unit_regular_polygon(cls, numVertices):
      """
      Return a :class:`Path` instance for a unit regular
      polygon with the given *numVertices* and radius of 1.0,
      centered at (0, 0).
      """
      if numVertices <= 16:
          path = cls._unit_regular_polygons.get(numVertices)
      else:
          path = None
      if path is None:
          theta = (
              2
              * np.pi
              / numVertices
              * np.arange(numVertices + 1).reshape((numVertices + 1, 1))
          )
          # This initial rotation is to make sure the polygon always
          # "points-up"
          theta += np.pi / 2.0
          verts = np.concatenate((np.cos(theta), np.sin(theta)), 1)
          codes = np.empty((numVertices + 1,))
          codes[0] = cls.MOVETO
          codes[1:-1] = cls.LINETO
          codes[-1] = cls.CLOSEPOLY
          path = cls(verts, codes, readonly=True)
          if numVertices <= 16:
              cls._unit_regular_polygons[numVertices] = path
      return path
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from weakref import WeakValueDictionary
  import numpy
  from .None import _path, rcParams
  from .cbook import _to_unmasked_float_array, simple_linear_interpolation, maxdict
label_desc: Use image node_id 32 for calling the Path obj's underlying member method code with example usage: obj.unit_regular_polygon(cls, numVertices) and returns: path