class_docstr: A series of possibly disconnected, possibly closed, line and curve
  segments.
  
  The underlying storage is made up of two parallel numpy arrays:
  
  - *vertices*: an (N, 2) float array of vertices
  - *codes*: an N-length `numpy.uint8` array of path codes, or None
  
  These two arrays always have the same length in the first
  dimension.  For example, to represent a cubic curve, you must
  provide three vertices and three `CURVE4` codes.
  
  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 Bézier curve from the current position, with the given
      control point, to the given end point.
  
  - `CURVE4` :  2 control points, 1 endpoint
      Draw a cubic Bézier 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.
  
  If *codes* is None, it is interpreted as a `MOVETO` followed by a series
  of `LINETO`.
  
  Users of Path objects should not access the vertices and codes arrays
  directly.  Instead, they should use `iter_segments` or `cleaned` to get the
  vertex/code pairs.  This helps, in particular, to consistently handle the
  case of *codes* being None.
  
  Some behavior of Path objects can be controlled by rcParams. See the
  rcParams whose keys start with '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 `Path` for the unit circle arc from angles *theta1* to
  *theta2* (in degrees).
  
  *theta2* is unwrapped to produce the shortest arc within 360 degrees.
  That is, if *theta2* > *theta1* + 360, the arc will be from *theta1* to
  *theta2* - 360 and not a full circle plus some extra overlap.
  
  If *n* is provided, it is the number of spline segments to make.
  If *n* is not provided, the number of spline segments is
  determined based on the delta between *theta1* and *theta2*.
  
     Masionobe, L.  2003.  `Drawing an elliptical arc using
     polylines, quadratic or cubic Bezier curves
     <https://web.archive.org/web/20190318044212/http://www.spaceroots.org/documents/ellipse/index.html>`_.
docstr_tok: ["Return","a","`","Path","`","for","the","unit","circle","arc","from","angles","*","theta1","*","to","*","theta2","*","(","in","degrees",")",".","*","theta2","*","is","unwrapped","to","produce","the","shortest","arc","within","360","degrees",".","That","is",",","if","*","theta2","*",">","*","theta1","*","+","360",",","the","arc","will","be","from","*","theta1","*","to","*","theta2","*","-","360","and","not","a","full","circle","plus","some","extra","overlap",".","If","*","n","*","is","provided",",","it","is","the","number","of","spline","segments","to","make",".","If","*","n","*","is","not","provided",",","the","number","of","spline","segments","is","determined","based","on","the","delta","between","*","theta1","*","and","*","theta2","*",".","Masionobe",",","L.","2003",".","`","Drawing","an","elliptical","arc","using","polylines",",","quadratic","or","cubic","Bezier","curves","<","https",":","\/\/web.archive.org\/web\/20190318044212\/http",":","\/\/www.spaceroots.org\/documents\/ellipse\/index.html",">","`","_","."]
code: def arc(cls, theta1, theta2, n=None, is_wedge=False):
      """
      Return a `Path` for the unit circle arc from angles *theta1* to
      *theta2* (in degrees).
  
      *theta2* is unwrapped to produce the shortest arc within 360 degrees.
      That is, if *theta2* > *theta1* + 360, the arc will be from *theta1* to
      *theta2* - 360 and not a full circle plus some extra overlap.
  
      If *n* is provided, it is the number of spline segments to make.
      If *n* is not provided, the number of spline segments is
      determined based on the delta between *theta1* and *theta2*.
  
         Masionobe, L.  2003.  `Drawing an elliptical arc using
         polylines, quadratic or cubic Bezier curves
         <https://web.archive.org/web/20190318044212/http://www.spaceroots.org/documents/ellipse/index.html>`_.
      """
      halfpi = np.pi * 0.5
  
      eta1 = theta1
      eta2 = theta2 - 360 * np.floor((theta2 - theta1) / 360)
      # Ensure 2pi range is not flattened to 0 due to floating-point errors,
      # but don't try to expand existing 0 range.
      if theta2 != theta1 and eta2 <= eta1:
          eta2 += 360
      eta1, eta2 = np.deg2rad([eta1, eta2])
  
      # number of curve segments to make
      if n is None:
          n = int(2 ** np.ceil((eta2 - eta1) / halfpi))
      if n < 1:
          raise ValueError("n must be >= 1 or None")
  
      deta = (eta2 - eta1) / n
      t = np.tan(0.5 * deta)
      alpha = np.sin(deta) * (np.sqrt(4.0 + 3.0 * t * t) - 1) / 3.0
  
      steps = np.linspace(eta1, eta2, n + 1, True)
      cos_eta = np.cos(steps)
      sin_eta = np.sin(steps)
  
      xA = cos_eta[:-1]
      yA = sin_eta[:-1]
      xA_dot = -yA
      yA_dot = xA
  
      xB = cos_eta[1:]
      yB = sin_eta[1:]
      xB_dot = -yB
      yB_dot = xB
  
      if is_wedge:
          length = n * 3 + 4
          vertices = np.zeros((length, 2), float)
          codes = np.full(length, cls.CURVE4, dtype=cls.code_type)
          vertices[1] = [xA[0], yA[0]]
          codes[0:2] = [cls.MOVETO, cls.LINETO]
          codes[-2:] = [cls.LINETO, cls.CLOSEPOLY]
          vertex_offset = 2
          end = length - 2
      else:
          length = n * 3 + 1
          vertices = np.empty((length, 2), float)
          codes = np.full(length, cls.CURVE4, dtype=cls.code_type)
          vertices[0] = [xA[0], yA[0]]
          codes[0] = cls.MOVETO
          vertex_offset = 1
          end = length
  
      vertices[vertex_offset:end:3, 0] = xA + alpha * xA_dot
      vertices[vertex_offset:end:3, 1] = yA + alpha * yA_dot
      vertices[vertex_offset + 1 : end : 3, 0] = xB - alpha * xB_dot
      vertices[vertex_offset + 1 : end : 3, 1] = yB - alpha * yB_dot
      vertices[vertex_offset + 2 : end : 3, 0] = xB
      vertices[vertex_offset + 2 : end : 3, 1] = yB
  
      return cls(vertices, codes, readonly=True)
  
imports: import copy
  from functools import lru_cache
  from weakref import WeakValueDictionary
  import numpy
  import matplotlib
  from .None import _api, _path
  from .cbook import _to_unmasked_float_array, simple_linear_interpolation
  from .bezier import BezierSegment
label_desc: Use image node_id 40 for calling the Path obj's underlying member method code with example usage: obj.arc(cls, theta1, theta2, n, is_wedge) and returns: cls