Skip to content

Commit

Permalink
multiple-regression.js: better exception msgs brownplt#1732
Browse files Browse the repository at this point in the history
  • Loading branch information
ds26gte committed May 17, 2024
1 parent 6f09230 commit cb49a3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/trove/multiple-regression.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
let js_y_s = runtime.ffi.toArray(y_s);
let num_mappings = js_x_s_s.length;
if (js_y_s.length !== num_mappings) {
throw runtime.ffi.throwMessageException("multiple-regression: number of mappings incorrect");
throw runtime.ffi.throwMessageException("multiple-regression: number of inputs doesn't match number of outputs");
}
let X = new Array(num_mappings);
let Y = new Array(num_mappings);
Expand All @@ -138,7 +138,7 @@
if (x_s_len === false) {
x_s_len = x_s_n;
} else if (x_s_n !== x_s_len) {
throw runtime.ffi.throwMessageException("multiple-regression: bad mapping");
throw runtime.ffi.throwMessageException("multiple-regression: lengths of input tuples are different");
}
X[r] = new Array(x_s_len + 1)
let Xr = X[r];
Expand Down

0 comments on commit cb49a3f

Please sign in to comment.