Skip to content

Commit df2ce1c

Browse files
authored
Apply suggestions from code review
Co-authored-by: Athan <kgryte@gmail.com> Signed-off-by: Athan <kgryte@gmail.com>
1 parent 60b1ad8 commit df2ce1c

1 file changed

Lines changed: 6 additions & 16 deletions

File tree

  • lib/node_modules/@stdlib/blas/ext/base/gediff

lib/node_modules/@stdlib/blas/ext/base/gediff/README.md

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ var a = [ 11.0 ];
4545
var out = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];
4646

4747
gediff( x.length, x, 1, 1, p, 1, 1, a, 1, out, 1 );
48-
49-
console.log( out );
50-
// => [ 1.0, 2.0, 2.0, 2.0, 2.0, 11.0 ]
48+
// out => [ 1.0, 2.0, 2.0, 2.0, 2.0, 11.0 ]
5149
```
5250

5351
The function has the following parameters:
@@ -73,9 +71,7 @@ var a = [ 11.0 ];
7371
var out = [ 0.0, 0.0, 0.0, 0.0 ];
7472

7573
gediff( 3, x, 2, 1, p, 1, 1, a, 1, out, 1 );
76-
77-
console.log( out );
78-
// => [ 1.0, 4.0, 4.0, 11.0 ]
74+
// out => [ 1.0, 4.0, 4.0, 11.0 ]
7975
```
8076

8177
Note that indexing is relative to the first index. To introduce an offset, use [`typed array`][mdn-typed-array] views.
@@ -94,9 +90,7 @@ var a = [ 11.0 ];
9490
var out = [ 0.0, 0.0, 0.0, 0.0, 0.0 ];
9591

9692
gediff( x1.length, x1, 1, 1, p, 1, 1, a, 1, out, 1 );
97-
98-
console.log( out );
99-
// => [ 1.0, 2.0, 2.0, 2.0, 11.0 ]
93+
// out => [ 1.0, 2.0, 2.0, 2.0, 11.0 ]
10094
```
10195

10296
<!-- lint disable maximum-heading-length -->
@@ -114,9 +108,7 @@ var a = [ 11.0 ];
114108
var out = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ];
115109

116110
gediff.ndarray( x.length, x, 1, 0, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0 );
117-
118-
console.log( out );
119-
// => [ 1.0, 2.0, 2.0, 2.0, 2.0, 11.0 ]
111+
// out => [ 1.0, 2.0, 2.0, 2.0, 2.0, 11.0 ]
120112
```
121113

122114
The function has the following additional parameters:
@@ -126,7 +118,7 @@ The function has the following additional parameters:
126118
- **offsetA**: starting index for `append`.
127119
- **offsetOut**: starting index for `out`.
128120

129-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameter supports indexing semantics based on a starting index. For example, to access only the last three elements:
121+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, offset parameters support indexing semantics based on starting indices. For example, to access only the last three elements:
130122

131123
```javascript
132124
var x = [ 2.0, 4.0, 6.0, 8.0, 10.0 ];
@@ -135,9 +127,7 @@ var a = [ 11.0 ];
135127
var out = [ 0.0, 0.0, 0.0, 0.0 ];
136128

137129
gediff.ndarray( 3, x, 1, x.length-3, 1, p, 1, 0, 1, a, 1, 0, out, 1, 0 );
138-
139-
console.log( out );
140-
// => [ 1.0, 2.0, 2.0, 11.0 ]
130+
// out => [ 1.0, 2.0, 2.0, 11.0 ]
141131
```
142132

143133
</section>

0 commit comments

Comments
 (0)