class_docstr: An unstructured triangular grid consisting of npoints points and
  ntri triangles.  The triangles can either be specified by the user
  or automatically generated using a Delaunay triangulation.
  
  Parameters
  ----------
  x, y : array_like of shape (npoints)
      Coordinates of grid points.
  triangles : integer array_like of shape (ntri, 3), optional
      For each triangle, the indices of the three points that make
      up the triangle, ordered in an anticlockwise manner.  If not
      specified, the Delaunay triangulation is calculated.
  mask : boolean array_like of shape (ntri), optional
      Which triangles are masked out.
  
  Attributes
  ----------
  `edges`
  `neighbors`
  is_delaunay : bool
      Whether the Triangulation is a calculated Delaunay
      triangulation (where `triangles` was not specified) or not.
  
  Notes
  -----
  For a Triangulation to be valid it must not have duplicate points,
  triangles formed from colinear points, or overlapping triangles.
class_docstr_tok: ["An","unstructured","triangular","grid","consisting","of","npoints","points","and","ntri","triangles",".","The","triangles","can","either","be","specified","by","the","user","or","automatically","generated","using","a","Delaunay","triangulation",".","Parameters","--","--","--","--","--","x",",","y",":","array_like","of","shape","(","npoints",")","Coordinates","of","grid","points",".","triangles",":","integer","array_like","of","shape","(","ntri",",","3",")",",","optional","For","each","triangle",",","the","indices","of","the","three","points","that","make","up","the","triangle",",","ordered","in","an","anticlockwise","manner",".","If","not","specified",",","the","Delaunay","triangulation","is","calculated",".","mask",":","boolean","array_like","of","shape","(","ntri",")",",","optional","Which","triangles","are","masked","out",".","Attributes","--","--","--","--","--","`","edges","`","`","neighbors","`","is_delaunay",":","bool","Whether","the","Triangulation","is","a","calculated","Delaunay","triangulation","(","where","`","triangles","`","was","not","specified",")","or","not",".","Notes","--","--","-","For","a","Triangulation","to","be","valid","it","must","not","have","duplicate","points",",","triangles","formed","from","colinear","points",",","or","overlapping","triangles","."]
docstr: Return a Triangulation object from the args and kwargs, and
  the remaining args and kwargs with the consumed values removed.
  
  There are two alternatives: either the first argument is a
  Triangulation object, in which case it is returned, or the args
  and kwargs are sufficient to create a new Triangulation to
  return.  In the latter case, see Triangulation.__init__ for
  the possible args and kwargs.
docstr_tok: ["Return","a","Triangulation","object","from","the","args","and","kwargs",",","and","the","remaining","args","and","kwargs","with","the","consumed","values","removed",".","There","are","two","alternatives",":","either","the","first","argument","is","a","Triangulation","object",",","in","which","case","it","is","returned",",","or","the","args","and","kwargs","are","sufficient","to","create","a","new","Triangulation","to","return",".","In","the","latter","case",",","see","Triangulation.__init__","for","the","possible","args","and","kwargs","."]
code: def get_from_args_and_kwargs(*args, **kwargs):
      """
      Return a Triangulation object from the args and kwargs, and
      the remaining args and kwargs with the consumed values removed.
  
      There are two alternatives: either the first argument is a
      Triangulation object, in which case it is returned, or the args
      and kwargs are sufficient to create a new Triangulation to
      return.  In the latter case, see Triangulation.__init__ for
      the possible args and kwargs.
      """
      if isinstance(args[0], Triangulation):
          triangulation = args[0]
          args = args[1:]
      else:
          x = args[0]
          y = args[1]
          args = args[2:]  # Consumed first two args.
  
          # Check triangles in kwargs then args.
          triangles = kwargs.pop("triangles", None)
          from_args = False
          if triangles is None and len(args) > 0:
              triangles = args[0]
              from_args = True
  
          if triangles is not None:
              try:
                  triangles = np.asarray(triangles, dtype=np.int32)
              except ValueError:
                  triangles = None
  
          if triangles is not None and (
              triangles.ndim != 2 or triangles.shape[1] != 3
          ):
              triangles = None
  
          if triangles is not None and from_args:
              args = args[1:]  # Consumed first item in args.
  
          # Check for mask in kwargs.
          mask = kwargs.pop("mask", None)
  
          triangulation = Triangulation(x, y, triangles, mask)
      return triangulation, args, kwargs
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/tri/triangulation.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  import matplotlib._tri
  import matplotlib._qhull
  import numpy
label_desc: Use image node_id 6 for calling the Triangulation obj's underlying member method code with example usage: obj.get_from_args_and_kwargs() and returns: triangulation,  args,  kwargs