Skip to content

Commit da17eab

Browse files
committed
chore: clean-up
--- 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: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: passed - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent d5f2b9a commit da17eab

File tree

6 files changed

+13
-11
lines changed

6 files changed

+13
-11
lines changed

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/kurtosis/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,8 @@ int main( void ) {
237237
int i;
238238
239239
for ( i = 0; i < 25; i++ ) {
240-
a = rand() * 10;
241-
b = rand() * 10;
240+
a = random_uniform( 0.1, 10.0 );
241+
b = random_uniform( 0.1, 10.0 );
242242
y = stdlib_base_dists_kumaraswamy_kurtosis( a, b );
243243
printf( "a: %lf, b: %lf, Kurt(X;a,b): %lf\n", a, b, y );
244244
}

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/kurtosis/benchmark/benchmark.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// MODULES //
2222

2323
var bench = require( '@stdlib/bench' );
24-
var randu = require( '@stdlib/random/base/randu' );
24+
var uniform = require( '@stdlib/random/array/uniform' );
2525
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2626
var EPS = require( '@stdlib/constants/float64/eps' );
2727
var pkg = require( './../package.json' ).name;
@@ -33,14 +33,17 @@ var kurtosis = require( './../lib' );
3333
bench( pkg, function benchmark( b ) {
3434
var shape1;
3535
var shape2;
36+
var len;
3637
var y;
3738
var i;
3839

40+
len = 100;
41+
shape1 = uniform( len, EPS, 10.0 );
42+
shape2 = uniform( len, EPS, 10.0 );
43+
3944
b.tic();
4045
for ( i = 0; i < b.iterations; i++ ) {
41-
shape1 = ( randu()*10.0 ) + EPS;
42-
shape2 = ( randu()*10.0 ) + EPS;
43-
y = kurtosis( shape1, shape2 );
46+
y = kurtosis( shape1[ i % len ], shape2[ i % len ] );
4447
if ( isnan( y ) ) {
4548
b.fail( 'should not return NaN' );
4649
}

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/kurtosis/benchmark/benchmark.native.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ var opts = {
4040
// MAIN //
4141

4242
bench( pkg+'::native', opts, function benchmark( b ) {
43-
var len;
4443
var shape1;
4544
var shape2;
45+
var len;
4646
var y;
4747
var i;
4848

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/kurtosis/benchmark/c/benchmark.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static double benchmark( void ) {
101101
int i;
102102

103103
for ( i = 0; i < 100; i++ ) {
104-
a[ i ] = random_uniform( -50.0, 50.0 );
104+
a[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 50.0 );
105105
b[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 );
106106
}
107107

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/kurtosis/examples/c/example.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ int main( void ) {
3232
int i;
3333

3434
for ( i = 0; i < 25; i++ ) {
35-
a = rand() * 10;
36-
b = rand() * 10;
35+
a = random_uniform( 0.1, 10.0 );
36+
b = random_uniform( 0.1, 10.0 );
3737
y = stdlib_base_dists_kumaraswamy_kurtosis( a, b );
3838
printf( "a: %lf, b: %lf, Kurt(X;a,b): %lf\n", a, b, y );
3939
}

lib/node_modules/@stdlib/stats/base/dists/kumaraswamy/kurtosis/src/addon.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,4 @@
1919
#include "stdlib/stats/base/dists/kumaraswamy/kurtosis.h"
2020
#include "stdlib/math/base/napi/binary.h"
2121

22-
// cppcheck-suppress shadowFunction
2322
STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_base_dists_kumaraswamy_kurtosis )

0 commit comments

Comments
 (0)