class_docstr: Smooth bivariate spline approximation in spherical coordinates.
  
  .. versionadded:: 0.11.0
  
  Parameters
  ----------
  theta, phi, r : array_like
      1-D sequences of data points (order is not important). Coordinates
      must be given in radians. Theta must lie within the interval (0, pi),
      and phi must lie within the interval (0, 2pi).
  w : array_like, optional
      Positive 1-D sequence of weights.
  s : float, optional
      Positive smoothing factor defined for estimation condition:
      ``sum((w(i)*(r(i) - s(theta(i), phi(i))))**2, axis=0) <= s``
      Default ``s=len(w)`` which should be a good value if 1/w[i] is an
      estimate of the standard deviation of r[i].
  eps : float, optional
      A threshold for determining the effective rank of an over-determined
      linear system of equations. `eps` should have a value between 0 and 1,
      the default is 1e-16.
  
  Notes
  -----
  For more information, see the FITPACK_ site about this function.
  
  .. _FITPACK: http://www.netlib.org/dierckx/sphere.f
  
  Examples
  --------
  Suppose we have global data on a coarse grid (the input data does not
  have to be on a grid):
  
  >>> theta = np.linspace(0., np.pi, 7)
  >>> phi = np.linspace(0., 2*np.pi, 9)
  >>> data = np.empty((theta.shape[0], phi.shape[0]))
  >>> data[:,0], data[0,:], data[-1,:] = 0., 0., 0.
  >>> data[1:-1,1], data[1:-1,-1] = 1., 1.
  >>> data[1,1:-1], data[-2,1:-1] = 1., 1.
  >>> data[2:-2,2], data[2:-2,-2] = 2., 2.
  >>> data[2,2:-2], data[-3,2:-2] = 2., 2.
  >>> data[3,3:-2] = 3.
  >>> data = np.roll(data, 4, 1)
  
  We need to set up the interpolator object
  
  >>> lats, lons = np.meshgrid(theta, phi)
  >>> from scipy.interpolate import SmoothSphereBivariateSpline
  >>> lut = SmoothSphereBivariateSpline(lats.ravel(), lons.ravel(),
  ...                                   data.T.ravel(), s=3.5)
  
  As a first test, we'll see what the algorithm returns when run on the
  input coordinates
  
  >>> data_orig = lut(theta, phi)
  
  Finally we interpolate the data to a finer grid
  
  >>> fine_lats = np.linspace(0., np.pi, 70)
  >>> fine_lons = np.linspace(0., 2 * np.pi, 90)
  
  >>> data_smth = lut(fine_lats, fine_lons)
  
  >>> import matplotlib.pyplot as plt
  >>> fig = plt.figure()
  >>> ax1 = fig.add_subplot(131)
  >>> ax1.imshow(data, interpolation='nearest')
  >>> ax2 = fig.add_subplot(132)
  >>> ax2.imshow(data_orig, interpolation='nearest')
  >>> ax3 = fig.add_subplot(133)
  >>> ax3.imshow(data_smth, interpolation='nearest')
  >>> plt.show()
class_docstr_tok: ["Smooth","bivariate","spline","approximation","in","spherical","coordinates",".","..","versionadded",":",":","0.11.0","Parameters","--","--","--","--","--","theta",",","phi",",","r",":","array_like","1-D","sequences","of","data","points","(","order","is","not","important",")",".","Coordinates","must","be","given","in","radians",".","Theta","must","lie","within","the","interval","(","0",",","pi",")",",","and","phi","must","lie","within","the","interval","(","0",",","2pi",")",".","w",":","array_like",",","optional","Positive","1-D","sequence","of","weights",".","s",":","float",",","optional","Positive","smoothing","factor","defined","for","estimation","condition",":","``","sum","(","(","w","(","i",")","*","(","r","(","i",")","-","s","(","theta","(","i",")",",","phi","(","i",")",")",")",")","*","*","2",",","axis=0",")","<","=","s","``","Default","``","s=len","(","w",")","``","which","should","be","a","good","value","if","1\/w","[","i","]","is","an","estimate","of","the","standard","deviation","of","r","[","i","]",".","eps",":","float",",","optional","A","threshold","for","determining","the","effective","rank","of","an","over-determined","linear","system","of","equations",".","`","eps","`","should","have","a","value","between","0","and","1",",","the","default","is","1e-16",".","Notes","--","--","-","For","more","information",",","see","the","FITPACK_","site","about","this","function",".","..","_FITPACK",":","http",":","\/\/www.netlib.org\/dierckx\/sphere.f","Examples","--","--","--","--","Suppose","we","have","global","data","on","a","coarse","grid","(","the","input","data","does","not","have","to","be","on","a","grid",")",":",">",">",">","theta","=","np.linspace","(","0.",",","np.pi",",","7",")",">",">",">","phi","=","np.linspace","(","0.",",","2","*","np.pi",",","9",")",">",">",">","data","=","np.empty","(","(","theta.shape","[","0","]",",","phi.shape","[","0","]",")",")",">",">",">","data","[",":",",0","]",",","data","[","0",",",":","]",",","data","[","-1",",",":","]","=","0.",",","0.",",","0",".",">",">",">","data","[","1",":","-1,1","]",",","data","[","1",":","-1",",","-1","]","=","1.",",","1",".",">",">",">","data","[","1,1",":","-1","]",",","data","[","-2,1",":","-1","]","=","1.",",","1",".",">",">",">","data","[","2",":","-2,2","]",",","data","[","2",":","-2",",","-2","]","=","2.",",","2",".",">",">",">","data","[","2,2",":","-2","]",",","data","[","-3,2",":","-2","]","=","2.",",","2",".",">",">",">","data","[","3,3",":","-2","]","=","3",".",">",">",">","data","=","np.roll","(","data",",","4",",","1",")","We","need","to","set","up","the","interpolator","object",">",">",">","lats",",","lons","=","np.meshgrid","(","theta",",","phi",")",">",">",">","from","scipy.interpolate","import","SmoothSphereBivariateSpline",">",">",">","lut","=","SmoothSphereBivariateSpline","(","lats.ravel","(",")",",","lons.ravel","(",")",",","...","data.T.ravel","(",")",",","s=3.5",")","As","a","first","test",",","we","'ll","see","what","the","algorithm","returns","when","run","on","the","input","coordinates",">",">",">","data_orig","=","lut","(","theta",",","phi",")","Finally","we","interpolate","the","data","to","a","finer","grid",">",">",">","fine_lats","=","np.linspace","(","0.",",","np.pi",",","70",")",">",">",">","fine_lons","=","np.linspace","(","0.",",","2","*","np.pi",",","90",")",">",">",">","data_smth","=","lut","(","fine_lats",",","fine_lons",")",">",">",">","import","matplotlib.pyplot","as","plt",">",">",">","fig","=","plt.figure","(",")",">",">",">","ax1","=","fig.add_subplot","(","131",")",">",">",">","ax1.imshow","(","data",",","interpolation='nearest","'",")",">",">",">","ax2","=","fig.add_subplot","(","132",")",">",">",">","ax2.imshow","(","data_orig",",","interpolation='nearest","'",")",">",">",">","ax3","=","fig.add_subplot","(","133",")",">",">",">","ax3.imshow","(","data_smth",",","interpolation='nearest","'",")",">",">",">","plt.show","(",")"]
code: def __init__(self, theta, phi, r, w=None, s=0.0, eps=1e-16):
      if np.issubclass_(w, float):
          w = ones(len(theta)) * w
      nt_, tt_, np_, tp_, c, fp, ier = dfitpack.spherfit_smth(
          theta, phi, r, w=w, s=s, eps=eps
      )
      if ier not in [0, -1, -2]:
          message = _spherefit_messages.get(ier, "ier=%s" % (ier))
          raise ValueError(message)
  
      self.fp = fp
      self.tck = tt_[:nt_], tp_[:np_], c[: (nt_ - 4) * (np_ - 4)]
      self.degrees = (3, 3)
  
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 SmoothSphereBivariateSpline object from inherited base classes: SphereBivariateSpline with example: obj = SmoothSphereBivariateSpline(theta, phi, r, w, s, eps)