def test_inputcheckNx1_array(self): """ Test input checking function for a valid 2D array input """ rho = np.array([[1], [2], [3]]) rho_expect, N_expect = np.array([1, 2, 3]), 3 np.testing.assert_almost_equal(rho_expect, utils.input_check_Nx1(rho)[0]) np.testing.assert_almost_equal(N_expect, utils.input_check_Nx1(rho)[1])
def test_inputcheckNx1_list(self): """ Test Nx1 input checking function for list input """ rho = [1, 2, 3] rho_expect, N_expect = np.array([1, 2, 3]), 3 np.testing.assert_almost_equal(rho_expect, utils.input_check_Nx1(rho)[0]) np.testing.assert_almost_equal(N_expect, utils.input_check_Nx1(rho)[1])