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 e482400..0000000 --- a/.github/.keepalive +++ /dev/null @@ -1 +0,0 @@ -2024-12-01T04:59:12.751Z diff --git a/.github/workflows/test_install.yml b/.github/workflows/test_install.yml index 6c8a74e..0ea6a97 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 4a79945..bbd7df2 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 a344f19..df94ceb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,40 @@ > Package changelog. +
+ +## Unreleased (2025-02-08) + +
+ +### Commits + +
+ +- [`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)_ + +
+ +
+ + + +
+ +### Contributors + +A total of 1 person contributed to this release. Thank you to this contributor: + +- Karan Anand + +
+ + + +
+ + +
## 0.2.2 (2024-07-28) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index a8d0bb6..bbccf30 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,52 +51,58 @@ 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> Milan Raj +Mohammad Bin Aftab <48010758+MohammadBinAftab@users.noreply.github.com> 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 +111,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 +121,11 @@ 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> +pranav-1720 <123018993+pranav-1720@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 239dbdb..34d1778 100644 --- a/README.md +++ b/README.md @@ -230,7 +230,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 7ea2822..95d9b9a 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,19 +33,28 @@ var quantile = require( './../lib' ); bench( pkg, function benchmark( b ) { var alpha; + var len; var m; var s; var p; var y; var i; + len = 100; + p = new Float64Array( len ); + alpha = new Float64Array( len ); + s = new Float64Array( len ); + m = new Float64Array( len ); + for ( i = 0; i < len; i++ ) { + p[ i ] = uniform( 0.0, 1.0 ); + alpha[ i ] = uniform( EPS, 20.0 ); + s[ i ] = uniform( EPS, 20.0 ); + m[ i ] = uniform( -20.0, 40.0 ); + } + b.tic(); for ( i = 0; i < b.iterations; i++ ) { - p = randu(); - alpha = ( randu()*20.0 ) + EPS; - m = ( randu()*60.0 ) - 20.0; - s = ( randu()*20.0 ) + EPS; - y = quantile( p, alpha, s, m ); + y = quantile( p[ i % len ], alpha[ i % len ], s[ i % len ], m[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } @@ -60,6 +70,7 @@ bench( pkg, function benchmark( b ) { bench( pkg+':factory', function benchmark( b ) { var myQuantile; var alpha; + var len; var m; var s; var p; @@ -70,11 +81,15 @@ bench( pkg+':factory', function benchmark( b ) { s = 3.0; m = 4.0; myQuantile = quantile.factory( alpha, s, m ); + len = 100; + p = new Float64Array( len ); + for ( i = 0; i < len; i++ ) { + p[ i ] = uniform( 0.0, 1.0 ); + } b.tic(); for ( i = 0; i < b.iterations; i++ ) { - p = randu(); - y = myQuantile( p ); + y = myQuantile( p[ i % len ] ); if ( isnan( y ) ) { b.fail( 'should not return NaN' ); } diff --git a/package.json b/package.json index b11195e..bd1cf9e 100644 --- a/package.json +++ b/package.json @@ -44,11 +44,13 @@ "@stdlib/utils-define-nonenumerable-read-only-property": "^0.2.2" }, "devDependencies": { + "@stdlib/array-float64": "^0.2.2", "@stdlib/constants-float64-eps": "^0.2.2", "@stdlib/constants-float64-ninf": "^0.2.2", "@stdlib/constants-float64-pinf": "^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",