Skip to content

Commit 355129a

Browse files
committed
fix: benchmark.js
--- 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: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: passed - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent 5ccc8fd commit 355129a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/node_modules/@stdlib/ndarray/with/benchmark/benchmark.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2524
var ndarray = require( '@stdlib/ndarray/ctor' );
2625
var shape2strides = require( '@stdlib/ndarray/base/shape2strides' );
2726
var isndarrayLike = require( '@stdlib/assert/is-ndarray-like' );
@@ -77,7 +76,7 @@ function createBenchmark(len, shape, xtype, order) {
7776
b.tic();
7877
for ( i = 0; i < b.iterations; i++ ) {
7978
out = ndarrayWith( x, index, i );
80-
if ( isnan( out.data[ i%out.length ] ) ) {
79+
if ( out.get.apply( out, index ) !== i ) {
8180
b.fail( 'should not return NaN' );
8281
}
8382
}

0 commit comments

Comments
 (0)