Skip to content

Commit

Permalink
Auto-generated commit
Browse files Browse the repository at this point in the history
  • Loading branch information
stdlib-bot committed Apr 1, 2022
1 parent 987f1a0 commit 33934a6
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 19 deletions.
1 change: 1 addition & 0 deletions .github/.keepalive
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2022-04-01T02:32:10.242Z
8 changes: 4 additions & 4 deletions base/dists/triangular/ctor/lib/ctor.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ function Triangular() {
throw new TypeError( format( 'invalid argument. Mode `c` must be a number. Value: `%s`.', c ) );
}
if ( !( a <= c && c <= b ) ) {
throw new RangeError( 'invalid arguments. Parameters must satisfy `a <= c <= b`. Value: `' + a + ',' + b + ',' + c + '`' );
throw new RangeError( format( 'invalid arguments. Parameters must satisfy `a <= c <= b`. `a: %f, b: %f, c: %f`.', a, b, c ) );
}
} else {
a = 0.0;
Expand All @@ -181,7 +181,7 @@ function Triangular() {
throw new TypeError( format( 'invalid value. Must be a number. Value: `%s`.', value ) );
}
if ( value > b || value > c ) {
throw new RangeError( 'invalid value. Must be less than or equal to `b` and `c`. Value: `'+ value + '`' );
throw new RangeError( format( 'invalid value. Must be less than or equal to `b` and `c`. Value: `%f`.', value ) );
}
a = value;
}
Expand All @@ -197,7 +197,7 @@ function Triangular() {
throw new TypeError( format( 'invalid value. Must be a number. Value: `%s`.', value ) );
}
if ( a > value || c > value ) {
throw new RangeError( 'invalid value. Must be greater than or equal to `a` and `c`. Value: `'+ value + '`' );
throw new RangeError( format( 'invalid value. Must be greater than or equal to `a` and `c`. Value: `%f`.', value ) );
}
b = value;
}
Expand All @@ -213,7 +213,7 @@ function Triangular() {
throw new TypeError( format( 'invalid value. Must be a number. Value: `%s`.', value ) );
}
if ( a > value || b < value ) {
throw new RangeError( 'invalid value. Must be greater than or equal to `a` and smaller than or equal to `b`. Value: `'+ value + '`' );
throw new RangeError( format( 'invalid value. Must be greater than or equal to `a` and smaller than or equal to `b`. Value: `%f`.', value ) );
}
c = value;
}
Expand Down
3 changes: 2 additions & 1 deletion chi2gof/lib/get_pmf.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
// MODULES //

var hasOwnProp = require( '@stdlib/assert/has-own-property' );
var format = require( '@stdlib/string/format' );
var PMF = require( './pmf.js' );


Expand All @@ -35,7 +36,7 @@ var PMF = require( './pmf.js' );
*/
function getPMF( name ) {
if ( !hasOwnProp( PMF, name ) ) {
return new Error( 'invalid argument. Unsupported/unrecognized distribution name. Value: `' + name + '`.' );
return new Error( format( 'invalid argument. Unsupported/unrecognized distribution name. Value: `%s`.', name ) );
}
return PMF[ name ];
}
Expand Down
4 changes: 2 additions & 2 deletions incr/covmat/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ function incrcovmat( out, means ) {
throw new TypeError( format( 'invalid argument. Must provide a 1-dimensional ndarray. Value: `%s`.', v ) );
}
if ( v.shape[ 0 ] !== order ) {
throw new Error( format( 'invalid argument. Vector length must match covariance matrix dimensions. Expected: %u. Actual: %u.', order, v.shape[ 0 ] ) );
throw new Error( format( 'invalid argument. Vector length must match covariance matrix dimensions. Expected: `%u`. Actual: `%u`.', order, v.shape[ 0 ] ) );
}
n = N;
N += 1;
Expand Down Expand Up @@ -322,7 +322,7 @@ function incrcovmat( out, means ) {
throw new TypeError( format( 'invalid argument. Must provide a 1-dimensional ndarray. Value: `%s`.', v ) );
}
if ( v.shape[ 0 ] !== order ) {
throw new Error( format( 'invalid argument. Vector length must match covariance matrix dimensions. Expected: %u. Actual: %u.', order, v.shape[ 0 ] ) );
throw new Error( format( 'invalid argument. Vector length must match covariance matrix dimensions. Expected: `%u`. Actual: `%u`.', order, v.shape[ 0 ] ) );
}
N += 1;
for ( i = 0; i < order; i++ ) {
Expand Down
2 changes: 1 addition & 1 deletion incr/grubbs/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ function incrgrubbs() {
}
if ( hasOwnProp( options, 'decision' ) ) {
if ( !isBoolean( options.decision ) ) {
throw new TypeError( format( 'invalid option. `%s` option must be boolean. Option: `%s`.', 'decision', options.decision ) );
throw new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'decision', options.decision ) );
}
decision = options.decision;
}
Expand Down
2 changes: 1 addition & 1 deletion incr/mgrubbs/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ function incrmgrubbs( W ) {
}
if ( hasOwnProp( options, 'decision' ) ) {
if ( !isBoolean( options.decision ) ) {
throw new TypeError( format( 'invalid option. `%s` option must be boolean. Option: `%s`.', 'decision', options.decision ) );
throw new TypeError( format( 'invalid option. `%s` option must be a boolean. Option: `%s`.', 'decision', options.decision ) );
}
decision = options.decision;
}
Expand Down
4 changes: 2 additions & 2 deletions incr/pcorrdistmat/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ function incrpcorrdistmat( out, means ) {
throw new TypeError( format( 'invalid argument. Must provide a 1-dimensional ndarray. Value: `%s`.', v ) );
}
if ( v.shape[ 0 ] !== order ) {
throw new Error( 'invalid argument. Vector length must match correlation matrix dimensions. Expected: '+order+'. Actual: '+v.shape[ 0 ]+'.' );
throw new Error( format( 'invalid argument. Vector length must match correlation matrix dimensions. Expected: `%u`. Actual: `%u`.', order, v.shape[ 0 ] ) );
}
n = N;
N += 1;
Expand Down Expand Up @@ -419,7 +419,7 @@ function incrpcorrdistmat( out, means ) {
throw new TypeError( format( 'invalid argument. Must provide a 1-dimensional ndarray. Value: `%s`.', v ) );
}
if ( v.shape[ 0 ] !== order ) {
throw new Error( 'invalid argument. Vector length must match correlation distance matrix dimensions. Expected: '+order+'. Actual: '+v.shape[ 0 ]+'.' );
throw new Error( format( 'invalid argument. Vector length must match correlation distance matrix dimensions. Expected: `%u`. Actual: `%u`.', order, v.shape[ 0 ] ) );
}
N += 1;
for ( i = 0; i < order; i++ ) {
Expand Down
4 changes: 2 additions & 2 deletions incr/pcorrmat/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ function incrpcorrmat( out, means ) {
throw new TypeError( format( 'invalid argument. Must provide a 1-dimensional ndarray. Value: `%s`.', v ) );
}
if ( v.shape[ 0 ] !== order ) {
throw new Error( 'invalid argument. Vector length must match correlation matrix dimensions. Expected: '+order+'. Actual: '+v.shape[ 0 ]+'.' );
throw new Error( format( 'invalid argument. Vector length must match correlation matrix dimensions. Expected: `%u`. Actual: `%u`.', order, v.shape[ 0 ] ) );
}
n = N;
N += 1;
Expand Down Expand Up @@ -430,7 +430,7 @@ function incrpcorrmat( out, means ) {
throw new TypeError( format( 'invalid argument. Must provide a 1-dimensional ndarray. Value: `%s`.', v ) );
}
if ( v.shape[ 0 ] !== order ) {
throw new Error( 'invalid argument. Vector length must match correlation matrix dimensions. Expected: '+order+'. Actual: '+v.shape[ 0 ]+'.' );
throw new Error( format( 'invalid argument. Vector length must match correlation matrix dimensions. Expected: `%u`. Actual: `%u`.', order, v.shape[ 0 ] ) );
}
N += 1;
for ( i = 0; i < order; i++ ) {
Expand Down
3 changes: 2 additions & 1 deletion kde2d/lib/get_kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

// MODULES //

var format = require( '@stdlib/string/format' );
var kernels = require( './kernels.js' );


Expand All @@ -35,7 +36,7 @@ var kernels = require( './kernels.js' );
function getKernel( name ) {
var kernel = kernels[ name ];
if ( kernel === void 0 ) {
return new Error( 'invalid argument. Unsupported/unrecognized kernel. Value: `' + name + '`.' );
return new Error( format( 'invalid argument. Unsupported/unrecognized kernel. Value: `%s`.', name ) );
}
return kernel;
}
Expand Down
3 changes: 2 additions & 1 deletion kstest/lib/get_cdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

// MODULES //

var format = require( '@stdlib/string/format' );
var CDF = require( './cdf.js' );


Expand All @@ -36,7 +37,7 @@ var CDF = require( './cdf.js' );
function getCDF( name ) {
var cdf = CDF[ name ];
if ( cdf === void 0 ) {
throw new Error( 'invalid argument. Unsupported/unrecognized distribution name. Value: `' + name + '`.' );
throw new Error( format( 'invalid argument. Unsupported/unrecognized distribution name. Value: `%s`.', name ) );
}
return cdf;
}
Expand Down
7 changes: 4 additions & 3 deletions levene-test/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

var isPlainObject = require( '@stdlib/assert/is-plain-object' );
var setReadOnly = require( '@stdlib/utils/define-read-only-property' );
var format = require( '@stdlib/string/format' );
var anova1 = require( './../../anova1' );
var absMeanDiff = require( './absdiff.js' );
var validate = require( './validate.js' );
Expand All @@ -41,7 +42,7 @@ var print = require( './print.js' ); // eslint-disable-line stdlib/no-redeclare
* @throws {TypeError} must provide array-like arguments
* @throws {RangeError} alpha option must be a number on the interval `[0,1]`
* @throws {Error} must provide at least two array-like arguments if `groups` is not provided
* @throws {TypeError} options must be an object
* @throws {TypeError} Options argument must be an object
* @throws {TypeError} must provide valid options
* @returns {Object} test results
*
Expand Down Expand Up @@ -87,7 +88,7 @@ function levene() {
levels = unique( groups );
k = levels.length;
if ( k < 2 ) {
throw new Error( 'invalid option. `groups` option must contain at least two unique elements. Value: `' + levels + '`.' );
throw new Error( format( 'invalid option. `%s` option must contain at least two unique elements. Value: `%s`.', 'groups', levels ) );
}
} else {
groups = [];
Expand All @@ -96,7 +97,7 @@ function levene() {
for ( i = 0; i < k; i++ ) {
arg = arguments[ i ];
if ( arg.length === 0 ) {
throw new Error( 'invalid argument. Provided arrays cannot be empty. Value: `' + arg + '`.' );
throw new Error( format( 'invalid argument. Provided arrays cannot be empty. Value: `%s`.', arg ) );
}
args = args.concat( arg );
for ( j = 0; j < arg.length; j++ ) {
Expand Down
2 changes: 1 addition & 1 deletion levene-test/lib/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ var format = require( '@stdlib/string/format' );
* @param {Object} [opts] - options object
* @param {PositiveInteger} [opts.digits=4] - number of digits after the decimal point
* @param {boolean} [opts.decision=true] - boolean indicating whether to print the test decision
* @throws {TypeError} options must be an object
* @throws {TypeError} Options argument must be an object
* @throws {TypeError} must provide valid options
* @returns {string} formatted output
*/
Expand Down

0 comments on commit 33934a6

Please sign in to comment.