diff --git a/.editorconfig b/.editorconfig index 60d743f..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}] @@ -121,7 +120,7 @@ indent_style = tab [*.{md,md.txt}] indent_style = space indent_size = 4 -trim_trailing_whitespace = false +trim_trailing_whitespace = true # Note: this disables using two spaces to force a hard line break, which is permitted in Markdown. As we don't typically follow that practice (TMK), we should be safe to automatically trim. # Set properties for `usage.txt` files: [usage.txt] diff --git a/.github/.keepalive b/.github/.keepalive deleted file mode 100644 index 0923ef2..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-12-01T05:25:48.772Z diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index b394f37..2cf03be 100644 --- a/.github/workflows/test_install.yml +++ b/.github/workflows/test_install.yml @@ -50,8 +50,8 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - # Run workflow job if `publish` workflow run is successful or when the workflow is manually run: - if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} + # Run workflow job if `publish` workflow run is successful or when the workflow is manually triggered or on a schedule: + if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} # Define the sequence of job steps... steps: diff --git a/.github/workflows/test_published_package.yml b/.github/workflows/test_published_package.yml index 94111ea..4b4e61e 100644 --- a/.github/workflows/test_published_package.yml +++ b/.github/workflows/test_published_package.yml @@ -47,8 +47,8 @@ jobs: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - # Run workflow job if `publish` workflow run is successful or when the workflow is manually run: - if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} + # Run workflow job if `publish` workflow run is successful or when the workflow is manually triggered or on a schedule: + if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} # Define the job's steps: steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index cedc403..571c0bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@
-## Unreleased (2024-12-01) +## Unreleased (2025-01-21)
@@ -12,6 +12,7 @@
+- [`9394549`](https://github.com/stdlib-js/stdlib/commit/939454926b745326a5b14bcd0924a0526baa93da) - **bench:** refactor random number generation in `stats/base/dists/beta` [(#4837)](https://github.com/stdlib-js/stdlib/pull/4837) _(by Karan Anand)_ - [`31fd427`](https://github.com/stdlib-js/stdlib/commit/31fd42744ec5d7073041f97c6f72350b8005c0fc) - **style:** remove unwanted empty lines _(by Philipp Burckhardt)_
@@ -24,8 +25,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 a8d0bb6..aedb148 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -2,11 +2,14 @@ # # Contributors listed in alphabetical order. +Aadish Jain Aayush Khanna Abhijit Raut Adarsh Palaskar Aditya Sapra -AgPriyanshu18 <113460573+AgPriyanshu18@users.noreply.github.com> +Ahmed Atwa +Ahmed Kashkoush +Ahmed Khaled Aleksandr <112382387+alextes90@users.noreply.github.com> Ali Salesi Aman Bhansali @@ -23,6 +26,10 @@ Dan Rose 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> Dominik Moritz Dorrin Sotoudeh @@ -44,13 +51,14 @@ Joey Reed Jordan Gallivan <115050475+Jordan-Gallivan@users.noreply.github.com> Joris Labie Justin Dennison +Karan Anand <119553199+anandkaranubc@users.noreply.github.com> Karthik Prakash <116057817+skoriop@users.noreply.github.com> -Khaldon Kohantika Nath <145763549+kohantikanath@users.noreply.github.com> Krishnendu Das <86651039+itskdhere@users.noreply.github.com> Kshitij-Dale <152467202+Kshitij-Dale@users.noreply.github.com> -Lovelin <100030865+lovelindhoni@users.noreply.github.com> +Lovelin Dhoni J B <100030865+lovelindhoni@users.noreply.github.com> Manik Sharma +Manvith M <148960168+manvith2003@users.noreply.github.com> Marcus Fantham Matt Cochrane Mihir Pandit <129577900+MSP20086@users.noreply.github.com> @@ -59,37 +67,41 @@ Mohammad Kaif Momtchil Momtchev Muhammad Haris Naresh Jagadeesan +Naveen Kumar Neeraj Pathak -NightKnight +Nishant Shinde <97207366+nishant-s7@users.noreply.github.com> Nithin Katta <88046362+nithinkatta@users.noreply.github.com> Nourhan Hasan <109472010+TheNourhan@users.noreply.github.com> Ognjen Jevremović Oneday12323 <107678750+Oneday12323@users.noreply.github.com> +Ori Miles <97595296+orimiles5@users.noreply.github.com> Philipp Burckhardt Prajwal Kulkarni Pranav Goswami -Praneki <97080887+PraneGIT@users.noreply.github.com> -Pratik <97464067+Pratik772846@users.noreply.github.com> +Pranjal Jha <97080887+PraneGIT@users.noreply.github.com> +Prashant Kumar Yadav <144602492+0PrashantYadav0@users.noreply.github.com> +Pratik Singh <97464067+Pratik772846@users.noreply.github.com> Pratyush Kumar Chouhan -Priyansh <88396544+itsspriyansh@users.noreply.github.com> +Priyansh Prajapati <88396544+itsspriyansh@users.noreply.github.com> +Priyanshu Agarwal <113460573+AgPriyanshu18@users.noreply.github.com> Pushpendra Chandravanshi -RISHAV <115060907+rishav2404@users.noreply.github.com> Raunak Kumar Gupta Rejoan Sardar <119718513+Rejoan-Sardar@users.noreply.github.com> Ricky Reusser Ridam Garg <67867319+RidamGarg@users.noreply.github.com> +Rishav <115060907+rishav2404@users.noreply.github.com> Robert Gislason Roman Stetsyk <25715951+romanstetsyk@users.noreply.github.com> -Rutam <138517416+performant23@users.noreply.github.com> +Rutam Kathale <138517416+performant23@users.noreply.github.com> Ruthwik Chikoti <145591715+ruthwikchikoti@users.noreply.github.com> Ryan Seal Rylan Yang <137365285+rylany27@users.noreply.github.com> Sai Srikar Dumpeti <80447788+the-r3aper7@users.noreply.github.com> -SarthakPaandey <145528240+SarthakPaandey@users.noreply.github.com> +Sarthak Paandey <145528240+SarthakPaandey@users.noreply.github.com> Saurabh Singh Seyyed Parsa Neshaei Shashank Shekhar Singh -Shivam <11shivam00@gmail.com> +Shivam Ahir <11shivam00@gmail.com> Shraddheya Shendre Shubh Mehta <93862397+Shubh942@users.noreply.github.com> Shubham Mishra @@ -98,7 +110,7 @@ Snehil Shah Soumajit Chatterjee <121816890+soumajit23@users.noreply.github.com> Spandan Barve Stephannie Jiménez Gacha -Suraj kumar <125961509+kumarsuraj212003@users.noreply.github.com> +Suraj Kumar <125961509+kumarsuraj212003@users.noreply.github.com> Tirtadwipa Manunggal Tudor Pagu <104032457+tudor-pagu@users.noreply.github.com> Tufailahmed Bargir <142114244+Tufailahmed-Bargir@users.noreply.github.com> @@ -108,12 +120,10 @@ UtkershBasnet <119008923+UtkershBasnet@users.noreply.github.com> Vaibhav Patel <98279986+noobCoderVP@users.noreply.github.com> Varad Gupta Vinit Pandit <106718914+MeastroZI@users.noreply.github.com> +Vivek Maurya Xiaochuan Ye +Yaswanth Kosuru <116426380+yaswanthkosuru@users.noreply.github.com> Yernar Yergaziyev -naveen -nishant-s7 <97207366+nishant-s7@users.noreply.github.com> olenkabilonizhka <62379231+olenkabilonizhka@users.noreply.github.com> -orimiles5 <97595296+orimiles5@users.noreply.github.com> rainn <88160429+AmCodesLame@users.noreply.github.com> rei2hu -yaswanth <116426380+yaswanthkosuru@users.noreply.github.com> diff --git a/NOTICE b/NOTICE index e6e7482..cbd3a29 100644 --- a/NOTICE +++ b/NOTICE @@ -1 +1 @@ -Copyright (c) 2016-2024 The Stdlib Authors. +Copyright (c) 2016-2025 The Stdlib Authors. diff --git a/README.md b/README.md index db7a038..888c9fd 100644 --- a/README.md +++ b/README.md @@ -241,7 +241,7 @@ See [LICENSE][stdlib-license]. ## Copyright -Copyright © 2016-2024. The Stdlib [Authors][stdlib-authors]. +Copyright © 2016-2025. The Stdlib [Authors][stdlib-authors].
diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 89572c9..52bb702 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; @@ -33,16 +34,24 @@ var mgf = require( './../lib' ); bench( pkg, function benchmark( b ) { var alpha; var beta; + var len; var t; var y; var i; + len = 100; + t = new Float64Array( len ); + alpha = new Float64Array( len ); + beta = new Float64Array( len ); + for ( i = 0; i < len; i++ ) { + t[ i ] = uniform( 0.0, 20.0 ); + alpha[ i ] = uniform( EPS, 100.0 ); + beta[ i ] = uniform( EPS, 100.0 ); + } + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - t = randu() * 20.0; - alpha = ( randu()*100.0 ) + EPS; - beta = ( randu()*100.0 ) + EPS; - y = mgf( t, alpha, beta ); + y = mgf( t[ i % len ], alpha[ i % len ], beta[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } @@ -59,6 +68,7 @@ bench( pkg+':factory', function benchmark( b ) { var mymgf; var alpha; var beta; + var len; var t; var y; var i; @@ -66,11 +76,15 @@ bench( pkg+':factory', function benchmark( b ) { alpha = 100.56789; beta = 55.54321; mymgf = mgf.factory( alpha, beta ); + len = 100; + t = new Float64Array( len ); + for ( i = 0; i < len; i++ ) { + t[ i ] = uniform( 0.0, 20.0 ); + } b.tic(); for ( i = 0; i < b.iterations; i++ ) { - t = randu() * 20.0; - y = mymgf( t ); + y = mymgf( t[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/package.json b/package.json index 2c4602c..2de9f95 100644 --- a/package.json +++ b/package.json @@ -45,10 +45,12 @@ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2" }, "devDependencies": { + "@stdlib/array-float64": "^0.2.2", "@stdlib/assert-is-number": "^0.2.2", "@stdlib/constants-float64-ninf": "^0.2.2", "@stdlib/constants-float64-pinf": "^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",