class_docstr: Define basic tools for triangular mesh analysis and improvement.
  
  A TriAnalizer encapsulates a :class:`~matplotlib.tri.Triangulation`
  object and provides basic tools for mesh analysis and mesh improvement.
  
  Parameters
  ----------
  triangulation : :class:`~matplotlib.tri.Triangulation` object
      The encapsulated triangulation to analyze.
  
  Attributes
  ----------
  `scale_factors`
class_docstr_tok: ["Define","basic","tools","for","triangular","mesh","analysis","and","improvement",".","A","TriAnalizer","encapsulates","a",":","class",":","`","~matplotlib.tri.Triangulation","`","object","and","provides","basic","tools","for","mesh","analysis","and","mesh","improvement",".","Parameters","--","--","--","--","--","triangulation",":",":","class",":","`","~matplotlib.tri.Triangulation","`","object","The","encapsulated","triangulation","to","analyze",".","Attributes","--","--","--","--","--","`","scale_factors","`"]
docstr: Factors to rescale the triangulation into a unit square.
  
  Returns *k*, tuple of 2 scale factors.
  
  Returns
  -------
  k : tuple of 2 floats (kx, ky)
      Tuple of floats that would rescale the triangulation :
      ``[triangulation.x * kx, triangulation.y * ky]``
      fits exactly inside a unit square.
docstr_tok: ["Factors","to","rescale","the","triangulation","into","a","unit","square",".","Returns","*","k","*",",","tuple","of","2","scale","factors",".","Returns","--","--","--","-","k",":","tuple","of","2","floats","(","kx",",","ky",")","Tuple","of","floats","that","would","rescale","the","triangulation",":","``","[","triangulation.x","*","kx",",","triangulation.y","*","ky","]","``","fits","exactly","inside","a","unit","square","."]
code: def scale_factors(self):
      """
      Factors to rescale the triangulation into a unit square.
  
      Returns *k*, tuple of 2 scale factors.
  
      Returns
      -------
      k : tuple of 2 floats (kx, ky)
          Tuple of floats that would rescale the triangulation :
          ``[triangulation.x * kx, triangulation.y * ky]``
          fits exactly inside a unit square.
  
      """
      compressed_triangles = self._triangulation.get_masked_triangles()
      node_used = (
          np.bincount(
              np.ravel(compressed_triangles),
              minlength=self._triangulation.x.size,
          )
          != 0
      )
      return (
          1 / np.ptp(self._triangulation.x[node_used]),
          1 / np.ptp(self._triangulation.y[node_used]),
      )
  
file_path: catboost/contrib/python/matplotlib/py2/matplotlib/tri/tritools.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import six
  from matplotlib.tri import Triangulation
  import numpy
label_desc: Use image node_id 2 for calling the TriAnalyzer obj's underlying member method code with example usage: obj.scale_factors() and returns: unknown,  unknown