Skip to content

Commit d81c41f

Browse files
committed
test: fix dtype comparison and update examples
--- 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: passed - 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: passed - task: lint_javascript_tests status: passed - 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 b5b774b commit d81c41f

3 files changed

Lines changed: 40 additions & 48 deletions

File tree

lib/node_modules/@stdlib/blas/ext/sorthp/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,18 +127,14 @@ var y = sorthp( x, {
127127
<!-- eslint no-undef: "error" -->
128128

129129
```javascript
130-
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
130+
var discreteUniform = require( '@stdlib/random/discrete-uniform' );
131131
var ndarray2array = require( '@stdlib/ndarray/to-array' );
132-
var ndarray = require( '@stdlib/ndarray/ctor' );
133132
var sorthp = require( '@stdlib/blas/ext/sorthp' );
134133

135134
// Generate an array of random numbers:
136-
var xbuf = discreteUniform( 25, -20, 20, {
135+
var x = discreteUniform( [ 5, 5 ], -20, 20, {
137136
'dtype': 'generic'
138137
});
139-
140-
// Wrap in an ndarray:
141-
var x = new ndarray( 'generic', xbuf, [ 5, 5 ], [ 5, 1 ], 0, 'row-major' );
142138
console.log( ndarray2array( x ) );
143139

144140
// Perform operation:

lib/node_modules/@stdlib/blas/ext/sorthp/examples/index.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,14 @@
1818

1919
'use strict';
2020

21-
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
21+
var discreteUniform = require( '@stdlib/random/discrete-uniform' );
2222
var ndarray2array = require( '@stdlib/ndarray/to-array' );
23-
var ndarray = require( '@stdlib/ndarray/ctor' );
2423
var sorthp = require( './../lib' );
2524

2625
// Generate an array of random numbers:
27-
var xbuf = discreteUniform( 25, -20, 20, {
26+
var x = discreteUniform( [ 5, 5 ], -20, 20, {
2827
'dtype': 'generic'
2928
});
30-
31-
// Wrap in an ndarray:
32-
var x = new ndarray( 'generic', xbuf, [ 5, 5 ], [ 5, 1 ], 0, 'row-major' );
3329
console.log( ndarray2array( x ) );
3430

3531
// Perform operation:

0 commit comments

Comments
 (0)