Skip to content

Commit

Permalink
closes #202; fix calibr bug when constant values
Browse files Browse the repository at this point in the history
  • Loading branch information
chanshing committed Jun 21, 2022
1 parent 0b8db73 commit e80506b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion accelerometer/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def getCalibrationCoefs(staticBoutsFile, summary):
inp = curr[:, k]
out = target[:, k]
inp = np.column_stack((inp, T))
inp = sm.add_constant(inp, prepend=True)
inp = sm.add_constant(inp, prepend=True, has_constant='add')
params = sm.WLS(out, inp, weights=weights).fit().params
# In the following,
# intercept == params[0]
Expand Down

0 comments on commit e80506b

Please sign in to comment.