class_docstr: Bivariate spline approximation over a rectangular mesh.
  
  Can be used for both smoothing and interpolating data.
  
  Parameters
  ----------
  x,y : array_like
      1-D arrays of coordinates in strictly ascending order.
  z : array_like
      2-D array of data with shape (x.size,y.size).
  bbox : array_like, optional
      Sequence of length 4 specifying the boundary of the rectangular
      approximation domain.  By default,
      ``bbox=[min(x,tx),max(x,tx), min(y,ty),max(y,ty)]``.
  kx, ky : ints, optional
      Degrees of the bivariate spline. Default is 3.
  s : float, optional
      Positive smoothing factor defined for estimation condition:
      ``sum((w[i]*(z[i]-s(x[i], y[i])))**2, axis=0) <= s``
      Default is ``s=0``, which is for interpolation.
  
  See Also
  --------
  SmoothBivariateSpline : a smoothing bivariate spline for scattered data
  bisplrep : an older wrapping of FITPACK
  bisplev : an older wrapping of FITPACK
  UnivariateSpline : a similar class for univariate spline interpolation
class_docstr_tok: ["Bivariate","spline","approximation","over","a","rectangular","mesh",".","Can","be","used","for","both","smoothing","and","interpolating","data",".","Parameters","--","--","--","--","--","x",",","y",":","array_like","1-D","arrays","of","coordinates","in","strictly","ascending","order",".","z",":","array_like","2-D","array","of","data","with","shape","(","x.size",",","y.size",")",".","bbox",":","array_like",",","optional","Sequence","of","length","4","specifying","the","boundary","of","the","rectangular","approximation","domain",".","By","default",",","``","bbox=","[","min","(","x",",","tx",")",",","max","(","x",",","tx",")",",","min","(","y",",","ty",")",",","max","(","y",",","ty",")","]","``",".","kx",",","ky",":","ints",",","optional","Degrees","of","the","bivariate","spline",".","Default","is","3.","s",":","float",",","optional","Positive","smoothing","factor","defined","for","estimation","condition",":","``","sum","(","(","w","[","i","]","*","(","z","[","i","]","-s","(","x","[","i","]",",","y","[","i","]",")",")",")","*","*","2",",","axis=0",")","<","=","s","``","Default","is","``","s=0","``",",","which","is","for","interpolation",".","See","Also","--","--","--","--","SmoothBivariateSpline",":","a","smoothing","bivariate","spline","for","scattered","data","bisplrep",":","an","older","wrapping","of","FITPACK","bisplev",":","an","older","wrapping","of","FITPACK","UnivariateSpline",":","a","similar","class","for","univariate","spline","interpolation"]
code: def __init__(self, x, y, z, bbox=[None] * 4, kx=3, ky=3, s=0):
      x, y = ravel(x), ravel(y)
      if not all(diff(x) > 0.0):
          raise ValueError("x must be strictly increasing")
      if not all(diff(y) > 0.0):
          raise ValueError("y must be strictly increasing")
      if not ((x.min() == x[0]) and (x.max() == x[-1])):
          raise ValueError("x must be strictly ascending")
      if not ((y.min() == y[0]) and (y.max() == y[-1])):
          raise ValueError("y must be strictly ascending")
      if not x.size == z.shape[0]:
          raise ValueError(
              "x dimension of z must have same number of "
              "elements as x"
          )
      if not y.size == z.shape[1]:
          raise ValueError(
              "y dimension of z must have same number of "
              "elements as y"
          )
      z = ravel(z)
      xb, xe, yb, ye = bbox
      nx, tx, ny, ty, c, fp, ier = dfitpack.regrid_smth(
          x, y, z, xb, xe, yb, ye, kx, ky, s
      )
  
      if ier not in [0, -1, -2]:
          msg = _surfit_messages.get(ier, "ier=%s" % (ier))
          raise ValueError(msg)
  
      self.fp = fp
      self.tck = tx[:nx], ty[:ny], c[: (nx - kx - 1) * (ny - ky - 1)]
      self.degrees = kx, ky
  
imports: from __future__ import division, print_function, absolute_import
  import warnings
  from numpy import zeros, concatenate, alltrue, ravel, all, diff, array, ones
  import numpy
  from .None import fitpack
  from .None import dfitpack
label_desc: Use image node_id 1 to create a new RectBivariateSpline object from inherited base classes: BivariateSpline with example: obj = RectBivariateSpline(x, y, z, bbox, kx, ky, s)