Skip to content

Commit 44b7fd2

Browse files
committed
fix: implemented suggested changes
--- 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: 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: passed - task: lint_license_headers status: passed ---
1 parent 0bb4610 commit 44b7fd2

3 files changed

Lines changed: 12 additions & 20 deletions

File tree

lib/node_modules/@stdlib/blas/ext/base/ndarray/grev/README.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ Reverses a one-dimensional ndarray in-place.
4343
```javascript
4444
var Float64Array = require( '@stdlib/array/float64' );
4545
var ndarray = require( '@stdlib/ndarray/base/ctor' );
46-
var ndarray2array = require( '@stdlib/ndarray/to-array' );
4746

4847
var xbuf = new Float64Array( [ 1.0, 2.0, 3.0 ] );
4948
var x = new ndarray( 'float64', xbuf, [ 3 ], [ 1 ], 0, 'row-major' );
5049

51-
grev( [ x ] );
50+
var out = grev( [ x ] );
51+
// returns <ndarray>[ 3.0, 2.0, 1.0 ]
5252

53-
console.log( ndarray2array( x ) );
54-
// => [ 3.0, 2.0, 1.0 ]
53+
var bool = ( out === x );
54+
// returns true
5555
```
5656

5757
The function has the following parameters:
@@ -79,15 +79,11 @@ The function has the following parameters:
7979
<!-- eslint no-undef: "error" -->
8080

8181
```javascript
82-
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
83-
var ndarray = require( '@stdlib/ndarray/base/ctor' );
82+
var uniform = require( '@stdlib/random/uniform' );
8483
var ndarray2array = require( '@stdlib/ndarray/to-array' );
8584
var grev = require( '@stdlib/blas/ext/base/ndarray/grev' );
8685

87-
var xbuf = discreteUniform( 10, -50, 50, {
88-
'dtype': 'float64'
89-
});
90-
var x = new ndarray( 'float64', xbuf, [ xbuf.length ], [ 1 ], 0, 'row-major' );
86+
var x = uniform( [10], -50, 50 );
9187
console.log( ndarray2array( x ) );
9288

9389
grev( [ x ] );

lib/node_modules/@stdlib/blas/ext/base/ndarray/grev/docs/types/index.d.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ import { ndarray } from '@stdlib/types/ndarray';
3636
* var xbuf = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
3737
* var x = new ndarray( 'float64', xbuf, [ 4 ], [ 1 ], 0, 'row-major' );
3838
*
39-
* grev( [ x ] );
39+
* var out = grev( [ x ] );
40+
* // returns <ndarray>[ 4.0, 3.0, 2.0, 1.0 ]
4041
*
41-
* var arr = ndarray2array( x );
42-
* // returns [ 4.0, 3.0, 2.0, 1.0 ]
42+
* var bool = ( out === x );
43+
* // returns true
4344
*/
4445
declare function grev<T extends ndarray>( arrays: [ T ] ): T;
4546

lib/node_modules/@stdlib/blas/ext/base/ndarray/grev/examples/index.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,11 @@
1818

1919
'use strict';
2020

21-
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
22-
var ndarray = require( '@stdlib/ndarray/base/ctor' );
21+
var uniform = require( '@stdlib/random/uniform' );
2322
var ndarray2array = require( '@stdlib/ndarray/to-array' );
2423
var grev = require( './../lib' );
2524

26-
var xbuf = discreteUniform( 10, -50, 50, {
27-
'dtype': 'float64'
28-
});
29-
30-
var x = new ndarray( 'float64', xbuf, [ xbuf.length ], [ 1 ], 0, 'row-major' );
25+
var x = uniform( [10], -50, 50 );
3126
console.log( ndarray2array( x ) );
3227

3328
grev( [ x ] );

0 commit comments

Comments
 (0)