Skip to content

Commit eeb8c95

Browse files
docs: fix use of weight parameter in example
PR-URL: #4915 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent b0b66d2 commit eeb8c95

File tree

1 file changed

+1
-1
lines changed
  • lib/node_modules/@stdlib/stats/incr/wmean/examples

1 file changed

+1
-1
lines changed

lib/node_modules/@stdlib/stats/incr/wmean/examples/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ console.log( '\nValue\tWeight\tWeighted Mean\n' );
3535
for ( i = 0; i < 100; i++ ) {
3636
x = randu() * 100.0;
3737
w = randu() * 100.0;
38-
mu = accumulator( x );
38+
mu = accumulator( x, w );
3939
console.log( '%d\t%d\t%d', x.toFixed( 4 ), w.toFixed( 4 ), mu.toFixed( 4 ) );
4040
}
4141
console.log( '\nFinal weighted mean: %d\n', accumulator() );

0 commit comments

Comments
 (0)