def spline_filter(input, order=3, output=numpy.float64):
 if ((order < 2) or (order > 5)):
  raise RuntimeError('spline order not supported')
 input = numpy.asarray(input)
 if numpy.iscomplexobj(input):
  raise TypeError('Complex type not supported')
 (output, return_value) = _ni_support._get_output(output, input)
 if ((order not in [0, 1]) and (input.ndim > 0)):
  for axis in range(input.ndim):
   spline_filter1d(input, order, axis, output=output)
   input = output
 else:
  output[...] = input[...]
 return return_value

def spline_filter ( input , order = 3 , output = numpy . float64 ) : if ( ( order < 2 ) or ( order > 5 ) ) : raise RuntimeError ( 'spline order not supported' ) input = numpy . asarray ( input ) if numpy . iscomplexobj ( input ) : raise TypeError ( 'Complex type not supported' ) ( output , return_value ) = _ni_support . _get_output ( output , input ) if ( ( order not in [ 0 , 1 ] ) and ( input . ndim > 0 ) ) : for axis in range ( input . ndim ) : spline_filter1d ( input , order , axis , output = output ) input = output else : output [ ... ] = input [ ... ] return return_value
multi-dimensional spline filter .