+ fixed a bug in the C++ interface
[qpalma.git] / python / set_param_palma.py
index e4befad..25746ce 100644 (file)
@@ -47,6 +47,8 @@ class Plf: #means piecewise linear function
 
    def convert2SWIG(self):
       ps = QPalmaDP.penalty_struct()
+
+      ps.len = len(self.limits)
    
       ps.limits = QPalmaDP.createDoubleArrayFromList(self.limits)
       ps.penalties = QPalmaDP.createDoubleArrayFromList(self.penalties)