Skip to content

Commit e45d3fc

Browse files
committed
refactor: use already defined variable
--- 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: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 9457f9f commit e45d3fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • lib/node_modules/@stdlib/ndarray/base/unary-reduce-strided1d/lib

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,8 @@ function unaryReduceStrided1d( fcn, arrays, dims, options ) { // eslint-disable-
378378
K = ndims - M;
379379

380380
// Verify that the output ndarray has the expected number of dimensions...
381-
if ( arr[ 1 ].shape.length !== K ) {
382-
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 non-reduced dimensions: %d. Array shape: [%s] (index: %d).', join( shx, ',' ), K, join( arr[ 1 ].shape, ',' ), 1 ) );
381+
if ( y.shape.length !== K ) {
382+
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 non-reduced dimensions: %d. Array shape: [%s] (index: %d).', join( shx, ',' ), K, join( y.shape, ',' ), 1 ) );
383383
}
384384
// Verify that any ancillary ndarrays have at least the number of non-reduced dimensions...
385385
for ( i = 2; i < N; i++ ) {

0 commit comments

Comments
 (0)