class_docstr: Bsplines of a given order and specified knots.
  
  Implementation is based on description in Chapter 5 of
  
  Hastie, Tibshirani and Friedman (2001). "The Elements of Statistical
  Learning." Springer-Verlag. 536 pages.
  
  
  INPUTS:
     knots  -- a sorted array of knots with knots[0] the lower boundary,
               knots[1] the upper boundary and knots[1:-1] the internal
               knots.
     order  -- order of the Bspline, default is 4 which yields cubic
               splines
     M      -- number of additional boundary knots, if None it defaults
               to order
     coef   -- an optional array of real-valued coefficients for the Bspline
               of shape (knots.shape + 2 * (M - 1) - order,).
     x      -- an optional set of x values at which to evaluate the
               Bspline to avoid extra evaluation in the __call__ method
class_docstr_tok: ["Bsplines","of","a","given","order","and","specified","knots",".","Implementation","is","based","on","description","in","Chapter","5","of","Hastie",",","Tibshirani","and","Friedman","(","2001",")",".","``","The","Elements","of","Statistical","Learning",".","''","Springer-Verlag",".","536","pages",".","INPUTS",":","knots","--","a","sorted","array","of","knots","with","knots","[","0","]","the","lower","boundary",",","knots","[","1","]","the","upper","boundary","and","knots","[","1",":","-1","]","the","internal","knots",".","order","--","order","of","the","Bspline",",","default","is","4","which","yields","cubic","splines","M","--","number","of","additional","boundary","knots",",","if","None","it","defaults","to","order","coef","--","an","optional","array","of","real-valued","coefficients","for","the","Bspline","of","shape","(","knots.shape","+","2","*","(","M","-","1",")","-","order",",",")",".","x","--","an","optional","set","of","x","values","at","which","to","evaluate","the","Bspline","to","avoid","extra","evaluation","in","the","__call__","method"]
docstr: Evaluate the BSpline at a given point, yielding
  a matrix B and return
  
  B * self.coef
  
  
  INPUTS:
     args -- optional arguments. If None, it returns self._basisx,
             the BSpline evaluated at the x values passed in __init__.
             Otherwise, return the BSpline evaluated at the
             first argument args[0].
  
  OUTPUTS: y
     y    -- value of Bspline at specified x values
  
  BUGS:
     If self has no attribute x, an exception will be raised
     because self has no attribute _basisx.
docstr_tok: ["Evaluate","the","BSpline","at","a","given","point",",","yielding","a","matrix","B","and","return","B","*","self.coef","INPUTS",":","args","--","optional","arguments",".","If","None",",","it","returns","self._basisx",",","the","BSpline","evaluated","at","the","x","values","passed","in","__init__",".","Otherwise",",","return","the","BSpline","evaluated","at","the","first","argument","args","[","0","]",".","OUTPUTS",":","y","y","--","value","of","Bspline","at","specified","x","values","BUGS",":","If","self","has","no","attribute","x",",","an","exception","will","be","raised","because","self","has","no","attribute","_basisx","."]
code: def __call__(self, *args):
      """
      Evaluate the BSpline at a given point, yielding
      a matrix B and return
  
      B * self.coef
  
  
      INPUTS:
         args -- optional arguments. If None, it returns self._basisx,
                 the BSpline evaluated at the x values passed in __init__.
                 Otherwise, return the BSpline evaluated at the
                 first argument args[0].
  
      OUTPUTS: y
         y    -- value of Bspline at specified x values
  
      BUGS:
         If self has no attribute x, an exception will be raised
         because self has no attribute _basisx.
      """
  
      if not args:
          b = self._basisx.T
      else:
          x = args[0]
          b = np.asarray(self.basis(x)).T
      return np.squeeze(np.dot(b, self.coef))
  
imports: import numpy
  import numpy.linalg
  from scipy.linalg import solveh_banded
  from scipy.optimize import golden
  from models import _hbspline
  import warnings
label_desc: Use image node_id 4 for calling the BSpline obj's underlying member method code with example usage: obj.__call__() and returns: np