code: def sproot(tck, mest=10):
      """
      Find the roots of a cubic B-spline.
  
      Given the knots (>=8) and coefficients of a cubic B-spline return the
      roots of the spline.
  
      Parameters
      ----------
      tck : tuple or a BSpline object
          If a tuple, then it should be a sequence of length 3, containing the
          vector of knots, the B-spline coefficients, and the degree of the
          spline.
          The number of knots must be >= 8, and the degree must be 3.
          The knots must be a montonically increasing sequence.
      mest : int, optional
          An estimate of the number of zeros (Default is 10).
  
      Returns
      -------
      zeros : ndarray
          An array giving the roots of the spline.
  
      Notes
      -----
      Manipulating the tck-tuples directly is not recommended. In new code,
      prefer using the `BSpline` objects.
  
      See also
      --------
      splprep, splrep, splint, spalde, splev
      bisplrep, bisplev
      BSpline
  
  
      References
      ----------
      .. [1] C. de Boor, "On calculating with b-splines", J. Approximation
          Theory, 6, p.50-62, 1972.
      .. [2] M. G. Cox, "The numerical evaluation of b-splines", J. Inst. Maths
          Applics, 10, p.134-149, 1972.
      .. [3] P. Dierckx, "Curve and surface fitting with splines", Monographs
          on Numerical Analysis, Oxford University Press, 1993.
  
      """
      if isinstance(tck, BSpline):
          if tck.c.ndim > 1:
              mesg = (
                  "Calling sproot() with BSpline objects with c.ndim > 1 is "
                  "not recommended."
              )
              warnings.warn(mesg, DeprecationWarning)
  
          t, c, k = tck.tck
  
          # _impl.sproot expects the interpolation axis to be last, so roll it.
          # NB: This transpose is a no-op if c is 1D.
          sh = tuple(range(c.ndim))
          c = c.transpose(sh[1:] + (0,))
          return _impl.sproot((t, c, k), mest)
      else:
          return _impl.sproot(tck, mest)
  
file_path: catboost/contrib/python/scipy/py2/scipy/interpolate/fitpack.py
imports: from __future__ import print_function, division, absolute_import
  import warnings
  import numpy
  from ._fitpack_impl import bisplrep, bisplev, dblint
  from .None import _fitpack_impl
  from ._bsplines import BSpline
label_desc: Use image node_id 5 for calling a global function with example usage: sproot(tck, mest) and returns: _impl, _impl