Commit 057ff198 authored by Guillaume Sagnol's avatar Guillaume Sagnol

prep release 111++

parent 2909536e
......@@ -36,6 +36,7 @@ on every function of PICOS.
Minor release with following changes:
* Partial trace of an Affine Expression, cf. :func:`partial_trace() <picos.tools.partial_trace>`
* Bugfix for compatibility with python3 (thanks to `Sergio Callegari <http://www.unibo.it/faculty/sergio.callegari>`_)
* Initial support for the SDPA solver (with the option ``solver='sdpa'``, picos works as a wrapper around the SDPA executable based on the :func:`write_to_file() <picos.Problem.write_to_file()>` function; thanks to `Petter Wittek <http://peterwittek.com/>`_ )
* Better PEP8-compliance
* 15 Apr. 15: **Picos** :ref:`1.1.0 <download>` **Released**
......
......@@ -1139,7 +1139,7 @@ class AffinExp(Expression):
if self.string[0] == '-':
import re
if ('+' not in self.string[1:]
) and ('-' not in self.string[1:]):
) and ('-' not in self.string[1:]):
selfneg.string = self.string[1:]
elif (self.string[1] == '(') and (
re.search('.*\)((\[.*\])|(.T))*$', self.string)): # a group in a (...)
......@@ -1342,8 +1342,8 @@ class AffinExp(Expression):
return Constraint('lin<', None, self, exp)
elif isinstance(exp, QuadExp):
if (self.isconstant() and self.size == (1, 1)
and (not exp.LR is None) and (not exp.LR[1] is None)
):
and (not exp.LR is None) and (not exp.LR[1] is None)
):
cst = AffinExp(
factors={}, constant=cvx.matrix(
np.sqrt(
......
......@@ -3713,14 +3713,14 @@ class Problem(object):
mats = [0]
# do we add the variable directly in a cone ?
if (self.options['handleConeVars'] and
len(J) == 1 and # a single var in the expression
J[0] not in allconevars and # not in a cone yet
# no coef on bar vars
len(J) == 1 and # a single var in the expression
J[0] not in allconevars and # not in a cone yet
# no coef on bar vars
not(any([mat for mat in mats])) and
h == 0 and # no constant term
#(V[0]==-1 or (J[0] not in ints)) #commented (int vars in cone yield a bug with mosek <6.59)
J[0] not in ints # int. variables cannot be scaled
):
):
conevars.append(J[0])
allconevars.append(J[0])
fxd.append((i, J[0]))
......@@ -6065,8 +6065,8 @@ class Problem(object):
duals.append(cvx.matrix(v))
duals[-1][0] = -duals[-1][0]
else:
vr = [-0.25 * v[0] - 0.5 * v[1]] + [0.5 * \
vi for vi in v[2:]] + [-0.25 * v[0] + 0.5 * v[1]]
vr = [-0.25 * v[0] - 0.5 * v[1]] + [0.5 *
vi for vi in v[2:]] + [-0.25 * v[0] + 0.5 * v[1]]
duals.append(cvx.matrix(vr))
idvarcone += szcone - len(fxd)
idconin += szcone - len(fxd)
......
......@@ -792,7 +792,7 @@ def put_indices_on_frames(frames, indices):
for t in frames[fi]:
tsp = t.split('.')
if (len(tsp) <= 2 and
all([s.isdigit() for s in tsp if len(s) > 0])
all([s.isdigit() for s in tsp if len(s) > 0])
):
num += 1
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment