Skip to content

Commit e49d710

Browse files
authored
Apply suggestions from code review
Signed-off-by: Athan <[email protected]>
1 parent 5819296 commit e49d710

File tree

4 files changed

+16
-21
lines changed

4 files changed

+16
-21
lines changed

lib/node_modules/@stdlib/stats/base/mskmax/README.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ The function has the following additional parameters:
101101
- **offsetX**: starting index for `x`.
102102
- **offsetMask**: starting index for `mask`.
103103

104-
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on a starting indices. For example, to calculate the maximum value for every other value in `x` starting from the second value
104+
While [`typed array`][mdn-typed-array] views mandate a view offset based on the underlying buffer, the offset parameters support indexing semantics based on starting indices. For example, to calculate the maximum value for every other value in `x` starting from the second value
105105

106106
```javascript
107107
var x = [ 2.0, 1.0, -2.0, -2.0, 3.0, 4.0, 5.0, 6.0 ];
@@ -139,16 +139,14 @@ var uniform = require( '@stdlib/random/array/uniform' );
139139
var bernoulli = require( '@stdlib/random/array/bernoulli' );
140140
var mskmax = require( '@stdlib/stats/base/mskmax' );
141141

142-
var uniformOptions = {
143-
'dtype': 'float32'
144-
};
145-
var bernoulliOptions = {
146-
'dtype': 'uint8'
147-
};
148-
149-
var x = uniform( 10, -50.0, 50.0, uniformOptions );
150-
var mask = bernoulli( x.length, 0.2, bernoulliOptions );
142+
var x = uniform( 10, -50.0, 50.0, {
143+
'dtype': 'float64'
144+
});
151145
console.log( x );
146+
147+
var mask = bernoulli( x.length, 0.2, {
148+
'dtype': 'uint8'
149+
});
152150
console.log( mask );
153151

154152
var v = mskmax( x.length, x, 1, mask, 1 );

lib/node_modules/@stdlib/stats/base/mskmax/benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var mskmax = require( './../lib/mskmax.js' );
3232
// VARIABLES //
3333

3434
var uniformOptions = {
35-
'dtype': 'float32'
35+
'dtype': 'generic'
3636
};
3737
var bernoulliOptions = {
3838
'dtype': 'uint8'

lib/node_modules/@stdlib/stats/base/mskmax/benchmark/benchmark.ndarray.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ var mskmax = require( './../lib/ndarray.js' );
3232
// VARIABLES //
3333

3434
var uniformOptions = {
35-
'dtype': 'float32'
35+
'dtype': 'generic'
3636
};
3737
var bernoulliOptions = {
3838
'dtype': 'uint8'

lib/node_modules/@stdlib/stats/base/mskmax/examples/index.js

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,13 @@ var uniform = require( '@stdlib/random/array/uniform' );
2222
var bernoulli = require( '@stdlib/random/array/bernoulli' );
2323
var mskmax = require( './../lib' );
2424

25-
var uniformOptions = {
26-
'dtype': 'float32'
27-
};
28-
var bernoulliOptions = {
29-
'dtype': 'uint8'
30-
};
31-
32-
var x = uniform( 10, -50.0, 50.0, uniformOptions );
33-
var mask = bernoulli( x.length, 0.2, bernoulliOptions );
25+
var x = uniform( 10, -50.0, 50.0, {
26+
'dtype': 'float64'
27+
});
3428
console.log( x );
29+
var mask = bernoulli( x.length, 0.2, {
30+
'dtype': 'uint8'
31+
});
3532
console.log( mask );
3633

3734
var v = mskmax( x.length, x, 1, mask, 1 );

0 commit comments

Comments
 (0)