Skip to content

Commit

Permalink
multiple-regression.js: gen'd predictor function shd check that all i…
Browse files Browse the repository at this point in the history
…ts arg tuple's elts are numbers brownplt#1732
  • Loading branch information
ds26gte committed May 17, 2024
1 parent d341e33 commit 6f09230
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/trove/multiple-regression.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@
}
let result = B[0][0];
for (let i = 0; i < x_s_len; i++) {
result += runtime.num_to_fixnum(js_x_s[i]) * B[i+1][0]
let x = js_x_s[i];
runtime.checkNumber(x);
result += runtime.num_to_fixnum(x) * B[i+1][0]
}
return runtime.makeNumber(result);
}
Expand Down

0 comments on commit 6f09230

Please sign in to comment.