coefficients: fix constant zero

This commit is contained in:
Robert Jördens 2016-02-23 17:56:38 +01:00
parent 53d5a458a2
commit 467268a06e
1 changed files with 2 additions and 0 deletions

View File

@ -73,6 +73,8 @@ def build_segment(durations, coefficients, target="bias",
if cdj or abs(yijk) or not compress: if cdj or abs(yijk) or not compress:
cdj.append(float(yijk)) cdj.append(float(yijk))
cdj.reverse() cdj.reverse()
if not cdj:
cdj.append(float(yij[0]))
cd.append({target: {variable: cdj}}) cd.append({target: {variable: cdj}})
yield {"duration": int(dxi), "channel_data": cd} yield {"duration": int(dxi), "channel_data": cd}