Skip to content

Commit dc6cb6f

Browse files
authored
fix: apply suggestions from code review
Signed-off-by: Muhammad Haris <[email protected]>
1 parent 4d89dc1 commit dc6cb6f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/node_modules/@stdlib/ndarray/find/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ var out = find( x, opts, isEven );
101101
// returns <ndarray>
102102

103103
var v = ndarray2array( out );
104-
// returns [ NaN, 2.0, NaN, 4.0 ]
104+
// returns [ [ NaN, 2.0 ], [ NaN, 4.0 ] ]
105105
```
106106

107107
By default, the function returns an [ndarray][@stdlib/ndarray/ctor] having a shape matching only the non-reduced dimensions of the input [ndarray][@stdlib/ndarray/ctor] (i.e., the reduced dimensions are dropped). To include the reduced dimensions as singleton dimensions in the output [ndarray][@stdlib/ndarray/ctor], set the `keepdims` option to `true`.
@@ -244,7 +244,7 @@ var x = array( [ [ [ 1.0, 2.0 ] ], [ [ 3.0, 4.0 ] ], [ [ 5.0, 6.0 ] ] ] );
244244
// returns <ndarray>
245245

246246
// Create an output ndarray:
247-
var y = empty( [ 4 ], {
247+
var y = empty( [ 2, 2 ], {
248248
'dtype': 'bool'
249249
});
250250

@@ -259,7 +259,7 @@ var bool = ( out === y );
259259
// returns true
260260

261261
var v = ndarray2array( y );
262-
// returns [ NaN, 2.0, NaN, 4.0 ]
262+
// returns [ [ NaN, 2.0 ], [ NaN, 4.0 ] ]
263263
```
264264

265265
</section>
@@ -308,7 +308,7 @@ x = fillBy( x, discreteUniform( 0, 10 ) );
308308
console.log( ndarray2array( x ) );
309309

310310
var y = find( x, isEven );
311-
console.log( y );
311+
console.log( y.get() );
312312
```
313313

314314
</section>

lib/node_modules/@stdlib/ndarray/find/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ x = fillBy( x, discreteUniform( 0, 10 ) );
3434
console.log( ndarray2array( x ) );
3535

3636
var y = find( x, isEven );
37-
console.log( y );
37+
console.log( y.get() );

0 commit comments

Comments
 (0)