def __init__(self, knot_vector, order):
        """Create a Bspline object.

        Parameters:
            knot_vector: Python list or rank-1 Numpy array containing knot vector
                         entries
            order: Order of interpolation, e.g. 0 -> piecewise constant between
                   knots, 1 -> piecewise linear between knots, etc.

        Returns:
            Bspline object, callable to evaluate basis functions at given
            values of `x` inside the knot span.
        """
        kv = np.atleast_1d(knot_vector)
        if kv.ndim > 1:
            raise ValueError("knot_vector must be Python list or rank-1 array, but got rank = %d" % (kv.ndim))
        self.knot_vector = kv

        order = int(order)
        if order < 0:
            raise ValueError("order must be integer >= 0, but got %d" % (order))

        self.p = order

        #Dummy calls to the functions for memory storage
        self.__call__(0.0)
        self.d(0.0)
def __init__ ( self , knot_vector , order ) : kv = np . atleast_1d ( knot_vector ) if kv . ndim > 1 : raise ValueError ( "knot_vector must be Python list or rank-1 array, but got rank = %d" % ( kv . ndim ) ) self . knot_vector = kv order = int ( order ) if order < 0 : raise ValueError ( "order must be integer >= 0, but got %d" % ( order ) ) self . p = order self . __call__ ( 0.0 ) self . d ( 0.0 )
Create a Bspline object.

        Parameters:
            knot_vector: Python list or rank-1 Numpy array containing knot vector
                         entries
            order: Order of interpolation, e.g. 0 -> piecewise constant between
                   knots, 1 -> piecewise linear between knots, etc.

        Returns:
            Bspline object, callable to evaluate basis functions at given
            values of `x` inside the knot span.