'Constructor arguments
*width*: float (default: 0.001)
width of full arrow tail
*length_includes_head*: [True | False] (default: False)
True if head is to be counted in calculating the length.
*head_width*: float or None (default: 3*width)
total width of the full arrow head
*head_length*: float or None (default: 1.5 * head_width)
length of arrow head
*shape*: [\'full\', \'left\', \'right\'] (default: \'full\')
draw the left-half, right-half, or full arrow
*overhang*: float (default: 0)
fraction that the arrow is swept back (0 overhang means
triangular shape). Can be negative or greater than one.
*head_starts_at_zero*: [True | False] (default: False)
if True, the head starts being drawn at coordinate 0
instead of ending at coordinate 0.
Other valid kwargs (inherited from :class:`Patch`) are:
%(Patch)s'

@docstring.dedent_interpd
def __init__(self, x, y, dx, dy, width=0.001, length_includes_head=False, head_width=None, head_length=None, shape=u'full', overhang=0, head_starts_at_zero=False, **kwargs):

    if (head_width is None):
        head_width = (3 * width)
    if (head_length is None):
        head_length = (1.5 * head_width)
    distance = np.hypot(dx, dy)
    if length_includes_head:
        length = distance
    else:
        length = (distance + head_length)
    if (not length):
        verts = []
    else:
        (hw, hl, hs, lw) = (head_width, head_length, overhang, width)
        left_half_arrow = np.array([[0.0, 0.0], [(- hl), ((- hw) / 2.0)], [((- hl) * (1 - hs)), ((- lw) / 2.0)], [(- length), ((- lw) / 2.0)], [(- length), 0]])
        if (not length_includes_head):
            left_half_arrow += [head_length, 0]
        if head_starts_at_zero:
            left_half_arrow += [(head_length / 2.0), 0]
        if (shape == u'left'):
            coords = left_half_arrow
        else:
            right_half_arrow = (left_half_arrow * [1, (-1)])
            if (shape == u'right'):
                coords = right_half_arrow
            elif (shape == u'full'):
                coords = np.concatenate([left_half_arrow[:(-1)], right_half_arrow[(-2)::(-1)]])
            else:
                raise ValueError((u'Got    unknown    shape:    %s' % shape))
        if (distance != 0):
            cx = (float(dx) / distance)
            sx = (float(dy) / distance)
        else:
            (cx, sx) = (0, 1)
        M = np.array([[cx, sx], [(- sx), cx]])
        verts = (np.dot(coords, M) + ((x + dx), (y + dy)))
    Polygon.__init__(self, list(map(tuple, verts)), closed=True, **kwargs)
