class_docstr: Specialized PolyCollection for barbs.
  
  The only API method is :meth:`set_UVC`, which can be used to
  change the size, orientation, and color of the arrows.  Locations
  are changed using the :meth:`set_offsets` collection method.
  Possibly this method will be useful in animations.
  
  There is one internal function :meth:`_find_tails` which finds
  exactly what should be put on the barb given the vector magnitude.
  From there :meth:`_make_barbs` is used to find the vertices of the
  polygon to represent the barb based on this information.
class_docstr_tok: ["Specialized","PolyCollection","for","barbs",".","The","only","API","method","is",":","meth",":","`","set_UVC","`",",","which","can","be","used","to","change","the","size",",","orientation",",","and","color","of","the","arrows",".","Locations","are","changed","using","the",":","meth",":","`","set_offsets","`","collection","method",".","Possibly","this","method","will","be","useful","in","animations",".","There","is","one","internal","function",":","meth",":","`","_find_tails","`","which","finds","exactly","what","should","be","put","on","the","barb","given","the","vector","magnitude",".","From","there",":","meth",":","`","_make_barbs","`","is","used","to","find","the","vertices","of","the","polygon","to","represent","the","barb","based","on","this","information","."]
docstr: Find how many of each of the tail pieces is necessary.
  
  Parameters
  ----------
  mag : `~numpy.ndarray`
      Vector magnitudes; must be non-negative (and an actual ndarray).
  rounding : bool, default: True
      Whether to round or to truncate to the nearest half-barb.
  half, full, flag : float, defaults: 5, 10, 50
      Increments for a half-barb, a barb, and a flag.
  
  Returns
  -------
  n_flags, n_barbs : int array
      For each entry in *mag*, the number of flags and barbs.
  half_flag : bool array
      For each entry in *mag*, whether a half-barb is needed.
  empty_flag : bool array
      For each entry in *mag*, whether nothing is drawn.
docstr_tok: ["Find","how","many","of","each","of","the","tail","pieces","is","necessary",".","Parameters","--","--","--","--","--","mag",":","`","~numpy.ndarray","`","Vector","magnitudes",";","must","be","non-negative","(","and","an","actual","ndarray",")",".","rounding",":","bool",",","default",":","True","Whether","to","round","or","to","truncate","to","the","nearest","half-barb",".","half",",","full",",","flag",":","float",",","defaults",":","5",",","10",",","50","Increments","for","a","half-barb",",","a","barb",",","and","a","flag",".","Returns","--","--","--","-","n_flags",",","n_barbs",":","int","array","For","each","entry","in","*","mag","*",",","the","number","of","flags","and","barbs",".","half_flag",":","bool","array","For","each","entry","in","*","mag","*",",","whether","a","half-barb","is","needed",".","empty_flag",":","bool","array","For","each","entry","in","*","mag","*",",","whether","nothing","is","drawn","."]
code: def _find_tails(self, mag, rounding=True, half=5, full=10, flag=50):
      """
      Find how many of each of the tail pieces is necessary.
  
      Parameters
      ----------
      mag : `~numpy.ndarray`
          Vector magnitudes; must be non-negative (and an actual ndarray).
      rounding : bool, default: True
          Whether to round or to truncate to the nearest half-barb.
      half, full, flag : float, defaults: 5, 10, 50
          Increments for a half-barb, a barb, and a flag.
  
      Returns
      -------
      n_flags, n_barbs : int array
          For each entry in *mag*, the number of flags and barbs.
      half_flag : bool array
          For each entry in *mag*, whether a half-barb is needed.
      empty_flag : bool array
          For each entry in *mag*, whether nothing is drawn.
      """
      # If rounding, round to the nearest multiple of half, the smallest
      # increment
      if rounding:
          mag = half * np.around(mag / half)
      n_flags, mag = divmod(mag, flag)
      n_barb, mag = divmod(mag, full)
      half_flag = mag >= half
      empty_flag = ~(half_flag | (n_flags > 0) | (n_barb > 0))
      return (
          n_flags.astype(int),
          n_barb.astype(int),
          half_flag,
          empty_flag,
      )
  
imports: import math
  import numpy
  from numpy import ma
  from matplotlib import _api, cbook, _docstring
  import matplotlib.artist
  import matplotlib.collections
  from matplotlib.patches import CirclePolygon
  import matplotlib.text
  import matplotlib.transforms
label_desc: Use image node_id 2 for calling the Barbs obj's underlying member method code with example usage: obj._find_tails(mag, rounding, half, full, flag) and returns: n_flags,  n_barb,  half_flag,  empty_flag