# Path: casiopeia/interfaces/casadi_interface.py
# def sx_sym(name, dim1 = 1, dim2 = 1):
# def sx_function(name, inputs, outputs):
# def mx_sym(name, dim1 = 1, dim2 = 1):
# def mx_function(name, inputs, outputs, options = {}):
# def dmatrix(dim1, dim2 = 1):
# def depends_on(b, a):
# def collocation_points(order, scheme):
# def vertcat(inputlist):
# def veccat(inputlist):
# def horzcat(inputlist):
# def repmat(inputobj, dim1, dim2):
# def vec(inputobj):
# def sqrt(inputobj):
# def mul(inputobj):
# def NlpSolver(name, solver, nlp, options):
# def daeIn(t = None, x = None, p = None):
# def daeOut(ode = None, alg = None):
# def Integrator(name, method, dae, options = {}):
# def diag(inputobj):
# def mx(dim1, dim2):
# def blockcat(a, b, c, d):
# def jacobian(a, b):
# def solve(a, b, solver):
# def mx_eye(dim1):
# def trace(inputobj):
# def det(inputobj):
# def diagcat(inputobj):
# 
# Path: casiopeia/inputchecks.py
# def set_system(system):
# def check_time_points_input(tp):
# def check_controls_data(udata, nu, number_of_controls):
# def check_constant_controls_data(qdata, nq):
# def check_states_data(xdata, nx, number_of_intervals):
# def check_parameter_data(pdata, n_p):
# def check_measurement_data(ydata, nphi, number_of_measurements):
# def check_measurement_weightings(wv, nphi, number_of_measurements):
# def check_input_error_weightings(weps_u, neps_u, number_of_intervals):
# def check_multi_doe_input(doe_setups):
# def check_multi_lsq_input(pe_setups):


import numpy as np
import unittest
import mock
from numpy.testing import assert_array_equal
from casiopeia.interfaces import casadi_interface as ci
from casiopeia import inputchecks
            nu, self.number_of_controls)
        assert_array_equal(udata, udata_ref)


    def test_input_columns(self):

        nu = 3
        udata_ref = np.random.rand(nu, self.number_of_controls)

        udata = inputchecks.check_controls_data(udata_ref.T, \
            nu, self.number_of_controls)
        assert_array_equal(udata, udata_ref)


    def test_input_none(self):

        nu = 3
        udata_ref = np.zeros((nu, self.number_of_controls))

        udata = inputchecks.check_controls_data(None, \
            nu, self.number_of_controls)
        assert_array_equal(udata, udata_ref)


    def test_zero_controls(self):

        # In this case, the input value is not used by the function, and
        # therefor irrelevant at this point

        nu = 0

# Path: casiopeia/interfaces/casadi_interface.py
# def sx_sym(name, dim1 = 1, dim2 = 1):
# def sx_function(name, inputs, outputs):
# def mx_sym(name, dim1 = 1, dim2 = 1):
# def mx_function(name, inputs, outputs, options = {}):
# def dmatrix(dim1, dim2 = 1):
# def depends_on(b, a):
# def collocation_points(order, scheme):
# def vertcat(inputlist):
# def veccat(inputlist):
# def horzcat(inputlist):
# def repmat(inputobj, dim1, dim2):
# def vec(inputobj):
# def sqrt(inputobj):
# def mul(inputobj):
# def NlpSolver(name, solver, nlp, options):
# def daeIn(t = None, x = None, p = None):
# def daeOut(ode = None, alg = None):
# def Integrator(name, method, dae, options = {}):
# def diag(inputobj):
# def mx(dim1, dim2):
# def blockcat(a, b, c, d):
# def jacobian(a, b):
# def solve(a, b, solver):
# def mx_eye(dim1):
# def trace(inputobj):
# def det(inputobj):
# def diagcat(inputobj):
# 
# Path: casiopeia/inputchecks.py
# def set_system(system):
# def check_time_points_input(tp):
# def check_controls_data(udata, nu, number_of_controls):
# def check_constant_controls_data(qdata, nq):
# def check_states_data(xdata, nx, number_of_intervals):
# def check_parameter_data(pdata, n_p):
# def check_measurement_data(ydata, nphi, number_of_measurements):
# def check_measurement_weightings(wv, nphi, number_of_measurements):
# def check_input_error_weightings(weps_u, neps_u, number_of_intervals):
# def check_multi_doe_input(doe_setups):
# def check_multi_lsq_input(pe_setups):


# Path: test/test_inputchecks.py
import numpy as np
import unittest
import mock
from numpy.testing import assert_array_equal
from casiopeia.interfaces import casadi_interface as ci
from casiopeia import inputchecks

            nu, self.number_of_controls)
        assert_array_equal(udata, udata_ref)


    def test_input_columns(self):

        nu = 3
        udata_ref = np.random.rand(nu, self.number_of_controls)

        udata = inputchecks.check_controls_data(udata_ref.T, \
            nu, self.number_of_controls)
        assert_array_equal(udata, udata_ref)


    def test_input_none(self):

        nu = 3
        udata_ref = np.zeros((nu, self.number_of_controls))

        udata = inputchecks.check_controls_data(None, \
            nu, self.number_of_controls)
        assert_array_equal(udata, udata_ref)


    def test_zero_controls(self):

        # In this case, the input value is not used by the function, and
        # therefor irrelevant at this point

        nu = 0

        udata_ref = ci.dmatrix(0, self.number_of_controls)