fixed use of `map()`
@@ -69,16 +69,16 @@ class CanonicalLinearSecondOrderConstraint(CanonicalLinearConstraint):
ps = path.evald(gridpoints)
pss = path.evaldd(gridpoints)
- F = np.array(map(self.cnst_F, p))
- g = np.array(map(self.cnst_g, p))
+ F = np.array(list(map(self.cnst_F, p)))
+ g = np.array(list(map(self.cnst_g, p)))
c = np.array(
- map(lambda p_: self.inv_dyn(p_, v_zero, v_zero), p)
+ [self.inv_dyn(p_, v_zero, v_zero) for p_ in p]
)
a = np.array(
- map(lambda (p_, ps_): self.inv_dyn(p_, v_zero, ps_), zip(p, ps))
+ [self.inv_dyn(p_, v_zero, ps_) for p_, ps_ in zip(p, ps)]
) - c
b = np.array(
- map(lambda (p_, ps_, pss_): self.inv_dyn(p_, ps_, pss_), zip(p, ps, pss))
+ [self.inv_dyn(p_, ps_, pss_) for p_, ps_, pss_ in zip(p, ps, pss)]
) - c
if self.discretization_type == DiscretizationType.Collocation:
