Skip to content

Commit bdf4246

Browse files
committed
refactor: update error messages
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 3aca840 commit bdf4246

File tree

1 file changed

+2
-2
lines changed
  • lib/node_modules/@stdlib/ndarray/base/unary-reduce-subarray/lib

1 file changed

+2
-2
lines changed

lib/node_modules/@stdlib/ndarray/base/unary-reduce-subarray/lib/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,13 +312,13 @@ function unaryReduceSubarray( fcn, arrays, dims, options ) { // eslint-disable-l
312312
}
313313
// Check whether we've been provided a valid number of dimensions to reduce...
314314
if ( M > ndims ) {
315-
throw new RangeError( format( 'invalid argument. Number of specified dimensions cannot exceed the number of dimensions in the input array. ndims(x) == %d. Value: [%s].', ndims, join( dims, ',' ) ) );
315+
throw new RangeError( format( 'invalid argument. Number of specified dimensions cannot exceed the number of dimensions in the input array. Number of dimensions: %d. Value: [%s].', ndims, join( dims, ',' ) ) );
316316
}
317317
// Verify that provided ndarrays have the expected number of dimensions...
318318
K = ndims - M;
319319
for ( i = 1; i < N; i++ ) {
320320
if ( arr[ i ].shape.length !== K ) {
321-
throw new Error( format( 'invalid argument. Arrays which are not being reduced must have the same number of non-reduced dimensions. ndims(x) == %d. Number of reduced dimensions: %d. ndims(arrays[%d]) == %d.', ndims, M, i, arr[ i ].shape.length ) );
321+
throw new Error( format( 'invalid argument. Arrays which are not being reduced must have the same number of non-reduced dimensions. Input array shape: [%s]. Number of reduced dimensions: %d. Array shape: [%s] (index: %d).', join( shx, ',' ), M, join( arr[ i ].shape, ',' ), i ) );
322322
}
323323
}
324324
// Determine whether we can avoid iteration altogether...

0 commit comments

Comments
 (0)