cvxgrp/cvxpy — pull request #150 by rmcgibbo (2014-12-10 09:46:08+00:00)
Title: Python3 support

Hey guys,

I cleaned up @bakhtiary's PR a bit, and fixed the remaining python3 incompatibilities, I think. Here's the nose test log. There are 4 errors, three of which are occurring on the master branch as well. The 4th is a memory error -- I'm not sure if it's related to py3, or just to something weird with my machine.

```
rmcgibbo@MacBook-Pro ~ (3.4)
$ python --version
Python 3.4.2 :: Continuum Analytics, Inc.
rmcgibbo@MacBook-Pro ~ (3.4)
$ nosetests cvxpy
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E...................EE..............................................................E............................
======================================================================
ERROR: test_cvxopt_sparse (cvxpy.tests.test_interfaces.TestInterfaces)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/tests/test_interfaces.py", line 95, in test_cvxopt_sparse
mat = interface.reshape(mat, (6,1))
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/interface/cvxopt_interface/sparse_matrix_interface.py", line 78, in reshape
new_mat[new_row, new_col] = v
MemoryError

======================================================================
ERROR: test_bool_prob (cvxpy.tests.test_mip_vars.TestMIPVariable)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/tests/test_mip_vars.py", line 45, in test_bool_prob
result = p.solve()
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/problems/problem.py", line 156, in solve
return self._solve(*args, **kwargs)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/problems/problem.py", line 240, in _solve
verbose, kwargs)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/problems/solvers/ecos_bb_intf.py", line 97, in solve
**solver_opts)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/ecos.py", line 61, in solve
return _ecos.csolve((m,n1,p), c, data, indices, colptr, h, dims, A.data, A.indices, A.indptr, b, **kwargs)
TypeError: 'int_vars_idx' is an invalid keyword argument for this function

======================================================================
ERROR: test_int_prob (cvxpy.tests.test_mip_vars.TestMIPVariable)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/tests/test_mip_vars.py", line 81, in test_int_prob
result = p.solve()
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/problems/problem.py", line 156, in solve
return self._solve(*args, **kwargs)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/problems/problem.py", line 240, in _solve
verbose, kwargs)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/problems/solvers/ecos_bb_intf.py", line 97, in solve
**solver_opts)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/ecos.py", line 61, in solve
return _ecos.csolve((m,n1,p), c, data, indices, colptr, h, dims, A.data, A.indices, A.indptr, b, **kwargs)
TypeError: 'int_vars_idx' is an invalid keyword argument for this function

======================================================================
ERROR: test_verbose (cvxpy.tests.test_problem.TestProblem)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/tests/test_problem.py", line 167, in test_verbose
p.solve(verbose=verbose, solver=solver)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/problems/problem.py", line 156, in solve
return self._solve(*args, **kwargs)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/problems/problem.py", line 240, in _solve
verbose, kwargs)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/cvxpy-0.2.15-py3.4.egg/cvxpy/problems/solvers/ecos_bb_intf.py", line 97, in solve
**solver_opts)
File "/Users/rmcgibbo/miniconda/envs/3.4/lib/python3.4/site-packages/ecos.py", line 61, in solve
return _ecos.csolve((m,n1,p), c, data, indices, colptr, h, dims, A.data, A.indices, A.indptr, b, **kwargs)
TypeError: 'int_vars_idx' is an invalid keyword argument for this function

----------------------------------------------------------------------
Ran 1298 tests in 11.838s

FAILED (errors=4)
```