# Path: geomdl/linalg.py
# def linspace(start, stop, num, decimals=18):
#     """ Returns a list of evenly spaced numbers over a specified interval.
# 
#     Inspired from Numpy's linspace function: https://github.com/numpy/numpy/blob/master/numpy/core/function_base.py
# 
#     :param start: starting value
#     :type start: float
#     :param stop: end value
#     :type stop: float
#     :param num: number of samples to generate
#     :type num: int
#     :param decimals: number of significands
#     :type decimals: int
#     :return: a list of equally spaced numbers
#     :rtype: list
#     """
#     start = float(start)
#     stop = float(stop)
#     if abs(start - stop) <= 10e-8:
#         return [start]
#     num = int(num)
#     if num > 1:
#         div = num - 1
#         delta = stop - start
#         return [float(("{:." + str(decimals) + "f}").format((start + (float(x) * float(delta) / float(div)))))
#                 for x in range(num)]
#     return [float(("{:." + str(decimals) + "f}").format(start))]
# 
# Path: geomdl/_utilities.py
# def export(fn):
#     """ Export decorator
# 
#     Please refer to the following SO article for details: https://stackoverflow.com/a/35710527
#     """
#     mod = sys.modules[fn.__module__]
#     if hasattr(mod, '__all__'):
#         mod.__all__.append(fn.__name__)
#     else:
#         mod.__all__ = [fn.__name__]
#     return fn


from .linalg import linspace
from ._utilities import export
        raise ValueError("Input values should be different than zero.")

    # Get keyword arguments
    clamped = kwargs.get('clamped', True)

    # Number of repetitions at the start and end of the array
    num_repeat = degree

    # Number of knots in the middle
    num_segments = num_ctrlpts - (degree + 1)

    if not clamped:
        # No repetitions at the start and end
        num_repeat = 0
        # Should conform the rule: m = n + p + 1
        num_segments = degree + num_ctrlpts - 1

    # First knots
    knot_vector = [0.0 for _ in range(0, num_repeat)]

    # Middle knots
    knot_vector += linspace(0.0, 1.0, num_segments + 2)

    # Last knots
    knot_vector += [1.0 for _ in range(0, num_repeat)]

    # Return auto-generated knot vector
    return knot_vector



# Path: geomdl/linalg.py
# def linspace(start, stop, num, decimals=18):
#     """ Returns a list of evenly spaced numbers over a specified interval.
# 
#     Inspired from Numpy's linspace function: https://github.com/numpy/numpy/blob/master/numpy/core/function_base.py
# 
#     :param start: starting value
#     :type start: float
#     :param stop: end value
#     :type stop: float
#     :param num: number of samples to generate
#     :type num: int
#     :param decimals: number of significands
#     :type decimals: int
#     :return: a list of equally spaced numbers
#     :rtype: list
#     """
#     start = float(start)
#     stop = float(stop)
#     if abs(start - stop) <= 10e-8:
#         return [start]
#     num = int(num)
#     if num > 1:
#         div = num - 1
#         delta = stop - start
#         return [float(("{:." + str(decimals) + "f}").format((start + (float(x) * float(delta) / float(div)))))
#                 for x in range(num)]
#     return [float(("{:." + str(decimals) + "f}").format(start))]
# 
# Path: geomdl/_utilities.py
# def export(fn):
#     """ Export decorator
# 
#     Please refer to the following SO article for details: https://stackoverflow.com/a/35710527
#     """
#     mod = sys.modules[fn.__module__]
#     if hasattr(mod, '__all__'):
#         mod.__all__.append(fn.__name__)
#     else:
#         mod.__all__ = [fn.__name__]
#     return fn


# Path: geomdl/knotvector.py
from .linalg import linspace
from ._utilities import export

        raise ValueError("Input values should be different than zero.")

    # Get keyword arguments
    clamped = kwargs.get('clamped', True)

    # Number of repetitions at the start and end of the array
    num_repeat = degree

    # Number of knots in the middle
    num_segments = num_ctrlpts - (degree + 1)

    if not clamped:
        # No repetitions at the start and end
        num_repeat = 0
        # Should conform the rule: m = n + p + 1
        num_segments = degree + num_ctrlpts - 1

    # First knots
    knot_vector = [0.0 for _ in range(0, num_repeat)]

    # Middle knots
    knot_vector += linspace(0.0, 1.0, num_segments + 2)

    # Last knots
    knot_vector += [1.0 for _ in range(0, num_repeat)]

    # Return auto-generated knot vector
    return knot_vector



@export