code: def spline_filter1d(
      input, order=3, axis=-1, output=numpy.float64, mode="mirror"
  ):
      """
      Calculate a one-dimensional spline filter along the given axis.
  
      The lines of the array along the given axis are filtered by a
      spline filter. The order of the spline must be >= 2 and <= 5.
  
      Parameters
      ----------
      %(input)s
      order : int, optional
          The order of the spline, default is 3.
      axis : int, optional
          The axis along which the spline filter is applied. Default is the last
          axis.
      output : ndarray or dtype, optional
          The array in which to place the output, or the dtype of the returned
          array. Default is `numpy.float64`.
      %(mode)s
  
      Returns
      -------
      spline_filter1d : ndarray
          The filtered input.
  
      Notes
      -----
      All functions in `ndimage.interpolation` do spline interpolation of
      the input image. If using b-splines of `order > 1`, the input image
      values have to be converted to b-spline coefficients first, which is
      done by applying this one-dimensional filter sequentially along all
      axes of the input. All functions that require b-spline coefficients
      will automatically filter their inputs, a behavior controllable with
      the `prefilter` keyword argument. For functions that accept a `mode`
      parameter, the result will only be correct if it matches the `mode`
      used when filtering.
      """
      if order < 0 or order > 5:
          raise RuntimeError("spline order not supported")
      input = numpy.asarray(input)
      if numpy.iscomplexobj(input):
          raise TypeError("Complex type not supported")
      output = _ni_support._get_output(output, input)
      if order in [0, 1]:
          output[...] = numpy.array(input)
      else:
          mode = _ni_support._extend_mode_to_code(mode)
          axis = _ni_support._check_axis(axis, input.ndim)
          _nd_image.spline_filter1d(input, order, axis, output, mode)
      return output
  
file_path: catboost/contrib/python/scipy/py2/scipy/ndimage/interpolation.py
imports: from __future__ import division, print_function, absolute_import
  import math
  import numpy
  import warnings
  from .None import _ni_support
  from .None import _nd_image
  from ._ni_docstrings import docdict
  from scipy.misc import doccer
label_desc: Use image node_id 1 for calling a global function with example usage: spline_filter1d(input, order, axis, output, mode) and returns: output