diff --git a/.editorconfig b/.editorconfig index 0779e8a..dab5d2a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -86,7 +86,6 @@ indent_style = tab [*.{f,f.txt}] indent_style = space indent_size = 2 -insert_final_newline = false # Set properties for shell files: [*.{sh,sh.txt}] diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b5b6d0..0e2f6fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2025-01-12) +## Unreleased (2025-02-08)
@@ -12,6 +12,7 @@
+- [`fa15161`](https://github.com/stdlib-js/stdlib/commit/fa15161761664bbdd2123292d3f1d7cf2d0f0a6d) - **bench:** refactor random number generation in `stats/base/dists/frechet` [(#4922)](https://github.com/stdlib-js/stdlib/pull/4922) _(by Karan Anand, stdlib-bot)_ - [`27bcbf6`](https://github.com/stdlib-js/stdlib/commit/27bcbf6b931385008c1210cddb77be5c86b6d94c) - **chore:** directly draw from desired distribution and tweak ranges _(by Philipp Burckhardt)_ - [`4a70790`](https://github.com/stdlib-js/stdlib/commit/4a707903dfef7c2b56216000165706497d19a251) - **style:** add missing spaces _(by Philipp Burckhardt)_ @@ -25,8 +26,9 @@ ### Contributors -A total of 1 person contributed to this release. Thank you to this contributor: +A total of 2 people contributed to this release. Thank you to the following contributors: +- Karan Anand - Philipp Burckhardt
diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 92d7552..bbccf30 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -27,6 +27,7 @@ Daniel Killenberger Daniel Yu <40680511+Daniel777y@users.noreply.github.com> Debashis Maharana Desh Deepak Kant <118960904+DeshDeepakKant@users.noreply.github.com> +Dev Goel <135586571+corsairier@users.noreply.github.com> Dhruv Arvind Singh <154677013+DhruvArvindSingh@users.noreply.github.com> Divyansh Seth <59174836+sethdivyansh@users.noreply.github.com> Dominic Lim <46486515+domlimm@users.noreply.github.com> @@ -62,6 +63,7 @@ Marcus Fantham Matt Cochrane Mihir Pandit <129577900+MSP20086@users.noreply.github.com> Milan Raj +Mohammad Bin Aftab <48010758+MohammadBinAftab@users.noreply.github.com> Mohammad Kaif Momtchil Momtchev Muhammad Haris @@ -124,5 +126,6 @@ Xiaochuan Ye Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com> Yernar Yergaziyev olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com> +pranav-1720 <123018993+pranav-1720@users.noreply.github.com> rainn <88160429+AmCodesLame@users.noreply.github.com> rei2hu diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 6506817..9256894 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -21,7 +21,8 @@ // MODULES // var bench = require( '@stdlib/bench-harness' ); -var randu = require( '@stdlib/random-base-randu' ); +var Float64Array = require( '@stdlib/array-float64' ); +var uniform = require( '@stdlib/random-base-uniform' ); var isnan = require( '@stdlib/math-base-assert-is-nan' ); var EPS = require( '@stdlib/constants-float64-eps' ); var pkg = require( './../package.json' ).name; @@ -32,17 +33,25 @@ var mean = require( './../lib' ); bench( pkg, function benchmark( b ) { var alpha; + var len; var m; var s; var y; var i; + len = 100; + alpha = new Float64Array( len ); + s = new Float64Array( len ); + m = new Float64Array( len ); + for ( i = 0; i < len; i++ ) { + alpha[ i ] = uniform( EPS, 20.0 ); + s[ i ] = uniform( EPS, 20.0 ); + m[ i ] = uniform( -20.0, 20.0 ); + } + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - alpha = ( randu()*20.0 ) + EPS; - s = ( randu()*20.0 ) + EPS; - m = ( randu()*40.0 ) - 20.0; - y = mean( alpha, s, m ); + y = mean( alpha[ i % len ], s[ i % len ], m[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/package.json b/package.json index 588ccf2..38e0c16 100644 --- a/package.json +++ b/package.json @@ -42,10 +42,12 @@ "@stdlib/math-base-special-gamma": "^0.3.0" }, "devDependencies": { + "@stdlib/array-float64": "^0.2.2", "@stdlib/constants-float64-eps": "^0.2.2", "@stdlib/constants-float64-ninf": "^0.2.2", "@stdlib/math-base-special-abs": "^0.2.2", "@stdlib/random-base-randu": "^0.2.1", + "@stdlib/random-base-uniform": "^0.2.1", "tape": "git+https://github.com/kgryte/tape.git#fix/globby", "istanbul": "^0.4.1", "tap-min": "git+https://github.com/Planeshifter/tap-min.git",