From 351b6a34869239f3a05e3febc138ef4d0eaf790c Mon Sep 17 00:00:00 2001 From: Jaysukh-409 Date: Sun, 29 Dec 2024 19:59:27 +0530 Subject: [PATCH 1/6] feat: add stats/base/dists/planck/mode --- 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: passed - task: lint_repl_help status: passed - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: passed - task: lint_javascript_tests status: passed - task: lint_javascript_benchmarks status: passed - task: lint_python status: passed - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../stats/base/dists/planck/mode/README.md | 137 ++++++++++++++++++ .../dists/planck/mode/benchmark/benchmark.js | 52 +++++++ .../base/dists/planck/mode/docs/repl.txt | 26 ++++ .../dists/planck/mode/docs/types/index.d.ts | 52 +++++++ .../base/dists/planck/mode/docs/types/test.ts | 44 ++++++ .../base/dists/planck/mode/examples/index.js | 31 ++++ .../stats/base/dists/planck/mode/lib/index.js | 43 ++++++ .../stats/base/dists/planck/mode/lib/main.js | 60 ++++++++ .../stats/base/dists/planck/mode/package.json | 68 +++++++++ .../mode/test/fixtures/python/data.json | 1 + .../mode/test/fixtures/python/runner.py | 76 ++++++++++ .../stats/base/dists/planck/mode/test/test.js | 72 +++++++++ 12 files changed, 662 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/main.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/package.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/data.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py create mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md new file mode 100644 index 000000000000..395af5d42579 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md @@ -0,0 +1,137 @@ + + +# Mode + +> Planck (discrete exponential) distribution [mode][mode]. + + + +
+ +The [mode][mode] for a Planck random variable with shape parameter `λ` is + + + +```math +\mathop{\mathrm{mode}}\left( X \right) = 0 +``` + + + +
+ + + + + +
+ +## Usage + +```javascript +var mode = require( '@stdlib/stats/base/dists/planck/mode' ); +``` + +#### mode( lambda ) + +Returns the [mode][mode] of a Planck distribution with shape parameter `lambda`. + +```javascript +var v = mode( 0.1 ); +// returns 0 + +v = mode( 1.5 ); +// returns 0 +``` + +If provided a success probability `lambda` is nonpositve or `NaN`, the function returns `NaN`. + +```javascript +var v = mode( NaN ); +// returns NaN + +v = mode( -1.5 ); +// returns NaN +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var mode = require( '@stdlib/stats/base/dists/planck/mode' ); + +var lambda = uniform( 10, 0.1, 5.0 ); + +var v; +var i; +for ( i = 0; i < lambda.length; i++ ) { + v = mode( lambda[ i ] ); + console.log( 'λ: %d, mode(X;λ): %d', lambda[ i ].toFixed( 4 ), v.toFixed( 4 ) ); +} +``` + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.js new file mode 100644 index 000000000000..d5bfd6edf15a --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.js @@ -0,0 +1,52 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var pkg = require( './../package.json' ).name; +var mode = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var lambda; + var y; + var i; + + lambda = uniform( 100, 0.1, 10.0 ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = mode( lambda[ i % lambda.length ] ); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + } + b.toc(); + if ( isnan( y ) ) { + b.fail( 'should not return NaN' ); + } + b.pass( 'benchmark finished' ); + b.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/repl.txt new file mode 100644 index 000000000000..b4567e8a667f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/repl.txt @@ -0,0 +1,26 @@ + +{{alias}}( λ ) + Returns the mode of a Planck distribution with shape parameter `λ`. + + If `lambda <= 0`, the function returns `NaN`. + + Parameters + ---------- + λ: number + Shape parameter. + + Returns + ------- + out: integer + Mode. + + Examples + -------- + > var v = {{alias}}( 0.1 ) + 0 + > v = {{alias}}( 1.5 ) + 0 + + See Also + -------- + diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/index.d.ts new file mode 100644 index 000000000000..bbbf8ef99d5a --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/index.d.ts @@ -0,0 +1,52 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +// TypeScript Version: 4.1 + +/** +* Returns the mode of a Planck distribution. +* +* ## Notes +* +* - If `lambda <= 0`, the function returns `NaN`. +* +* @param lambda - shape parameter +* @returns mode +* +* @example +* var v = mode( 0.1 ); +* // returns 0 +* +* @example +* var v = mode( 1.5 ); +* // returns 0 +* +* @example +* var v = mode( -1.1 ); +* // returns NaN +* +* @example +* var v = mode( NaN ); +* // returns NaN +*/ +declare function mode( lambda: number ): number; + + +// EXPORTS // + +export = mode; diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/test.ts new file mode 100644 index 000000000000..4c72eb5a7517 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/test.ts @@ -0,0 +1,44 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +import mode = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + mode( 0.3 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided a value other than a number... +{ + mode( true ); // $ExpectError + mode( false ); // $ExpectError + mode( null ); // $ExpectError + mode( undefined ); // $ExpectError + mode( '5' ); // $ExpectError + mode( [] ); // $ExpectError + mode( {} ); // $ExpectError + mode( ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + mode(); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js new file mode 100644 index 000000000000..c273daefd7f8 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js @@ -0,0 +1,31 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2018 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +var uniform = require( '@stdlib/random/array/uniform' ); +var mode = require( './../lib' ); + +var lambda = uniform( 10, 0.1, 5.0 ); + +var v; +var i; +for ( i = 0; i < lambda.length; i++ ) { + v = mode( lambda[ i ] ); + console.log( 'λ: %d, mode(X;λ): %d', lambda[ i ].toFixed( 4 ), v.toFixed( 4 ) ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/index.js new file mode 100644 index 000000000000..97ddf9a76393 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/index.js @@ -0,0 +1,43 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +/** +* Planck distribution mode. +* +* @module @stdlib/stats/base/dists/planck/mode +* +* @example +* var mode = require( '@stdlib/stats/base/dists/planck/mode' ); +* +* var v = mode( 0.1 ); +* // returns 0 +* +* v = mode( 1.5 ); +* // returns 0 +*/ + +// MODULES // + +var mode = require( './main.js' ); + + +// EXPORTS // + +module.exports = mode; diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/main.js new file mode 100644 index 000000000000..15eb391ff29f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/main.js @@ -0,0 +1,60 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var isnan = require( '@stdlib/math/base/assert/is-nan' ); + + +// MAIN // + +/** +* Returns the mode of a Planck distribution. +* +* @param {PositiveNumber} lambda - shape parameter +* @returns {NonNegativeInteger} mode +* +* @example +* var v = mode( 0.1 ); +* // returns 0 +* +* @example +* var v = mode( 1.5 ); +* // returns 0 +* +* @example +* var v = mode( -1.1 ); +* // returns NaN +* +* @example +* var v = mode( NaN ); +* // returns NaN +*/ +function mode( lambda ) { + if ( isnan( lambda ) || lambda <= 0.0 ) { + return NaN; + } + return 0; +} + + +// EXPORTS // + +module.exports = mode; diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/package.json b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/package.json new file mode 100644 index 000000000000..04c5b8bceac3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/package.json @@ -0,0 +1,68 @@ +{ + "name": "@stdlib/stats/base/dists/planck/mode", + "version": "0.0.0", + "description": "Planck (discrete exponential) distribution mode.", + "license": "Apache-2.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "main": "./lib", + "directories": { + "benchmark": "./benchmark", + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": {}, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": {}, + "devDependencies": {}, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "statistics", + "stats", + "distribution", + "dist", + "planck", + "parameter", + "memoryless", + "life-time", + "discrete", + "location", + "center", + "mode", + "univariate" + ] +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/data.json b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/data.json new file mode 100644 index 000000000000..2d87a66dbbff --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/data.json @@ -0,0 +1 @@ +{"lambda": [11.31455620449707, 6.26448886761384, 19.795095612366048, 12.89620797244307, 17.45502427924005, 19.821275423021493, 3.1440914554507793, 4.3439362314902885, 11.89888381093595, 0.7920386573931704, 17.87091225743653, 13.12535051419176, 19.72946881181968, 15.313135064548133, 1.9376752528234475, 18.157660727309544, 7.392646319205491, 15.798594104023467, 2.445326443236655, 11.363182763837077, 6.443461034318203, 15.436443130730229, 7.247782852306061, 8.669654603614298, 16.940746125871662, 5.7326532695035715, 15.799088027583457, 13.998941211976089, 5.937437197663549, 3.8294554023084193, 9.251798405091673, 0.7716296004941703, 17.28901604159516, 5.423416166631494, 5.231044142407497, 9.547381719896993, 5.573151787659523, 0.353655350250357, 4.972290877372332, 5.47863025533456, 12.609659740360739, 1.1462482660449624, 17.22427799371895, 8.148080734989737, 10.898081198709832, 8.118386674424238, 19.698414834882747, 17.144320635314198, 0.5248703069731375, 6.907884499896147, 18.055746163089356, 14.090183268567205, 16.660596291723188, 1.7447863701439092, 8.191535264994162, 1.7469469454038045, 16.587042198591135, 8.454974146471741, 5.667414266326776, 15.766204291761053, 7.576359281573781, 6.569087037684456, 9.903647309627727, 9.290575480550743, 6.235687090075808, 9.330480766626167, 17.50172788410798, 7.2848701867712755, 2.63572768275365, 6.253673059994831, 6.067176386442483, 17.040780748235925, 3.6062323691459808, 15.996210754666185, 6.994536857264084, 5.2667419002179905, 14.563729773989717, 11.425300569722436, 19.659692692864997, 8.473870819272413, 15.800565097480035, 17.055194405410706, 7.007524098847073, 0.9335679442568745, 15.312774879969284, 15.636216319767843, 19.01570749562167, 8.048550317414058, 6.474817299229862, 15.725397401504972, 4.8326905437659455, 12.460095991761861, 8.35591369197334, 16.731475968619062, 3.5277020621161514, 7.329518516004894, 1.3251505389128337, 13.676476496221149, 17.67647806612516, 7.217970581366677, 15.60198480193879, 17.462482147707853, 9.661735457626444, 2.837069899432716, 0.9958713916909434, 11.484221237633855, 9.832011266894202, 18.85071388548591, 3.4322007811011934, 4.485208691289431, 4.996110356028378, 12.742011272400845, 7.004915090842645, 3.1222361072913607, 17.851053937270816, 17.643220763803782, 1.800558725111192, 13.230273592881236, 17.66818412451007, 5.964328592672128, 7.370114705881736, 5.431196935779507, 12.298214877591017, 19.717691517235444, 3.0153511603489958, 18.48739401526202, 18.930647595192077, 13.913040166776824, 13.563582563482948, 5.8867360826099, 1.0486716223321069, 15.625724298656259, 2.756415473481464, 3.8066456551890338, 13.416766365811297, 14.000023262773693, 6.547920741082529, 11.860067306707814, 1.4273085897696336, 8.054015758479407, 14.629599092115278, 9.915089380739781, 6.219792309243253, 4.499956387457673, 4.395028318746328, 16.96940649020504, 6.198195360450431, 6.210379173005151, 7.377575277005921, 13.50556775848014, 10.899777287843493, 8.6246518372946, 6.170938648897173, 4.010219824815506, 6.185989423288887, 15.126889724995245, 17.992142566507127, 6.343364664298578, 19.11491669211187, 4.112001847088431, 18.910014681282895, 7.368545167079574, 4.991687425668488, 15.559133299616626, 3.336186628799198, 6.252495606864173, 10.872192590539505, 8.606507214287422, 2.2073442957169576, 5.9997278549057675, 14.747642298401109, 1.5877975140206213, 14.993758769067638, 17.388681209084996, 14.191752027074621, 2.6736348068619886, 17.617264118255445, 8.68389690702465, 7.063955307304179, 15.903133488758623, 5.595181119735426, 7.069856205053096, 5.145948434220786, 9.813646061637535, 7.127190231328305, 2.231264611694186, 16.55570581363374, 4.590035455675203, 13.661864346278831, 3.5162935183108024, 8.25660236459447, 18.104293056113324, 17.39698232687987, 8.579391825563071, 3.6090079046767, 2.5945535971498757, 5.7988740589223315, 9.259363793115776, 17.206021566687127, 15.943962355621181, 1.857221180216575, 2.9820301418172535, 14.658727934408585, 7.110503040726566, 0.7728084891712039, 16.365363903002805, 1.5817939116607027, 12.164554788086816, 18.37107925493966, 13.611490423723584, 17.56986750831881, 12.653791122865991, 2.0833617692680084, 2.4093126723831837, 7.459886869949861, 10.292828000698591, 7.285578272886852, 4.665165233007464, 13.400253180008876, 18.344340567784542, 12.893536032970221, 6.5517181473778185, 12.374704346764297, 19.540482310952516, 15.49192371279144, 15.015573726744853, 16.73576176816011, 19.091142154928434, 5.100984450419439, 12.595713148700096, 11.49699776628819, 9.51151276610464, 14.665305748862005, 17.275434892522007, 11.782967148932444, 8.352956700790235, 2.2485288745728504, 15.051253212001933, 10.187909601240426, 1.7499328978552353, 12.16599579758957, 13.892900830440611, 6.1094104495334856, 13.26106960423971, 7.033142953054439, 2.740975841853255, 3.4014000615735185, 3.8965589915126952, 16.526892545679132, 6.611523798434373, 10.78407187579009, 0.8475615427061634, 12.206557834223577, 7.012677811516004, 17.71353316700114, 1.2094308997688308, 5.893461444500745, 14.525831844308321, 4.42469299122113, 17.865907363919394, 2.8338444465700796, 11.098945996871132, 0.6723693686260956, 13.76843359702427, 18.211209354817363, 16.98801173637381, 2.659255240270171, 16.92429797287248, 0.9781545775886769, 7.376027884772965, 0.8321947686977205, 19.52232897733205, 1.5999754163611146, 17.788116734476702, 16.12050382746676, 17.365203042179843, 8.233706816017355, 3.014726277089579, 2.9627406893068753, 3.2119139119216378, 1.9684244369254622, 14.885354104820951, 0.09668780583564685, 19.04030943017377, 6.550165484801436, 14.970487940669656, 18.2531329825216, 19.46633411766615, 18.0258359641318, 17.44506562260389, 14.603590134856725, 5.405894333829259, 7.25203231604393, 1.4826274701697462, 4.010006338902246, 4.5305601680045555, 5.2943410918063964, 13.377103932235618, 14.662240432885651, 13.948989246516142, 10.349319400412005, 2.7315711475009485, 10.000770668226082, 7.950754369007688, 12.377845158425663, 14.304990304292707, 12.06668461724828, 9.061934322192275, 16.82324849198669, 10.226473577660283, 5.199407738125426, 14.895587712591984, 10.82919612092325, 14.680988070465435, 5.284047561123106, 9.576567559693247, 1.9926241324768945, 3.6450797708533034, 0.8857999772135905, 14.732127604847037, 7.286036407926229, 11.108343461871666, 4.0155653646106, 12.482050848610015, 8.885553815556218, 18.257431811202743, 2.1638135529220337, 18.965653543915987, 19.203180481848257, 8.862952492472019, 18.697732526640486, 17.752119083175096, 0.0810710728015529, 7.949372025129633, 2.088818796166758, 5.122525351742704, 14.452138940125614, 6.459674336975674, 5.85337477047839, 5.19242718574991, 1.6554129821060126, 10.592962454579313, 10.738295930784691, 11.417057586118158, 0.5053352369664532, 17.942734718582315, 3.010314469080384, 4.765588484292116, 0.69247109054551, 14.928224154750025, 3.1431271588636367, 0.2414809554500752, 13.226091371173549, 12.457191083717255, 14.403842152796454, 12.628662101516069, 1.0170981383917477, 16.219495776307717, 12.009296917298828, 1.4134445195773515, 8.150289815283232, 11.986528502796407, 9.954880630621899, 2.2328125939399612, 4.259929370140103, 3.203212731162266, 11.275468654354846, 17.053987382120017, 12.687896677629942, 4.538840355775613, 11.413175191318315, 1.2623652377761374, 0.5391633684507235, 8.912680016476022, 9.854854970264192, 1.3479347401005781, 8.814776731635106, 11.71314115896389, 5.550248713947388, 8.592531083187911, 12.61244964945248, 18.298318749277215, 15.444738943621665, 5.38569236978625, 19.852049495990624, 14.242862298533929, 5.6801872132327835, 15.625058491602285, 11.183585086761036, 14.029003781527278, 6.428592591379356, 18.2484403850395, 14.830712986076332, 3.51274665312439, 19.385978323234074, 15.501360223954322, 16.092541676325858, 13.525418813858895, 1.6885000131921712, 2.237631081430649, 18.332037743083728, 9.69305660112321, 0.6917618917010082, 4.1908281973258, 13.73096547504889, 5.1460510846477465, 13.914852652917354, 2.0148921213806315, 6.639225726254423, 2.9366106511802825, 10.887155006559057, 5.697709884960771, 16.457920652363228, 17.013512366970648, 5.706255557347461, 18.845024571492306, 12.423277660884565, 11.152729204679622, 11.189053688929855, 13.246083124760105, 10.3329025953622, 8.853326092690196, 18.20466060044456, 11.733225283306874, 8.03683642897209, 6.454241834281296, 6.383612602958387, 10.237353251435898, 13.233521341993953, 12.748116715353534, 12.80701175881603, 10.615625246186585, 2.558945553109986, 15.161923314474244, 15.89980183356871, 11.802265217459862, 0.3394070096195523, 19.285313094171205, 16.678377983684825, 12.985078706005515, 2.1724549184242004, 19.05356430492737, 5.379362967265862, 16.024771087773672, 19.578819945257695, 0.07801036217379265, 0.5252073983754646, 1.4053451694722563, 11.44735070375009, 8.27748389034924, 16.137710627824376, 18.29832041793001, 14.392223065221073, 8.487494149296804, 18.70042781174969, 1.9284963129713306, 18.92032223351957, 12.59219883256918, 14.997708635694833, 19.489545947619604, 5.479645505871691, 5.928035225959565, 17.16410622908127, 13.587677458846452, 18.87445585393618, 13.199658001330906, 10.40982765142315, 2.713401844081935, 11.432935990858455, 12.295464609900769, 1.7614602065329699, 6.989074037740261, 5.124541096292914, 4.935798483241256, 18.14954439020935, 17.590139170663882, 13.013106497385136, 12.371011169862465, 11.190551402356357, 12.795133812048027, 2.088261731517125, 5.120733584358117, 9.88408814988743, 16.605786400588926, 8.67822139340907, 7.536129137795338, 5.508489493372403, 17.0118608824199, 11.802142549786135, 8.299348063011351, 10.573213421952556, 7.080500419045903, 18.093564978385547, 11.106129125454478, 18.253327006123197, 4.564739558480877, 19.764677286677713, 19.21637386869824, 3.270434667237412, 0.7899583961714618, 8.228459343368424, 11.14436794534888, 18.503678630429793, 0.9023982366861261, 17.004725399760552, 12.76593777342111, 19.53589220124516, 0.8283330714990789, 18.109840842583974, 19.046610758551953, 19.030506343684532, 14.715395754595686, 13.970079310629515, 14.12984681721422, 7.247928523486755, 6.611202592187011, 13.175181783331729, 3.7809676931254166, 3.4380391310535496, 11.588802565518264, 15.127656004502834, 5.302094441835241, 14.753102262962074, 14.04580162370232, 14.839453465337781, 19.026398397380852, 14.611125434113026, 12.662638688740754, 6.571234292882197, 9.969521291213612, 13.0169885999789, 8.30186873237494, 13.185473410571609, 9.13727249266951, 15.239795568558378, 15.61921457781186, 13.766159785811604, 10.442975599707127, 5.632261390544, 12.24679167678699, 9.017728323046883, 5.419779239007201, 2.4336434714455857, 10.950899902742746, 4.227654173267428, 3.8443506524023485, 12.174047095817286, 7.759174709185615, 9.50814914902751, 7.937269212139393, 6.62719539340425, 9.004744934992232, 9.026300384537521, 7.798644600262663, 14.517933520994788, 7.112283887608437, 9.93786475475979, 16.323315149956382, 18.632852565907495, 9.124885592903896, 3.1899575630089827, 19.685648848502296, 19.086686451573268, 11.480176771570523, 13.547577076340659, 0.382352442581122, 15.554940398683277, 12.16771283001626, 2.360001912099343, 4.657703815145997, 12.523067878283545, 8.349349184228656, 18.847631113727996, 10.371092442346638, 0.8920556130433832, 0.08027732141458355, 10.655870751403445, 16.31069473930616, 12.261267648351335, 4.1431586279022365, 18.08474562052387, 18.951328087513147, 16.468760638120465, 19.819174010579516, 11.911334807886574, 0.19853913345437624, 3.925188122792005, 2.9316038559956747, 6.796958816462528, 15.389603303576106, 3.8673162419599105, 8.010736707003828, 10.784229327215755, 19.39041980309238, 16.52144932692926, 19.01207872155365, 5.194013933761983, 11.91507756801804, 3.1520556477180883, 17.89034017518458, 11.122848544665196, 6.363775940450463, 7.324271794677815, 17.03598182044248, 1.6479085366602608, 8.74511420042735, 16.064706397542473, 19.76022683037122, 13.086316508162426, 3.0162075631270557, 4.044642856386362, 2.2691730146963285, 16.920395947118823, 12.271008220119175, 0.08736613763401513, 9.99063810022513, 13.22669481273693, 6.999431073672932, 6.905837999624918, 19.587203173398, 7.582917031197236, 6.108911134468853, 15.516592088348201, 17.499232764763924, 12.802537609366635, 7.389937800227033, 11.77085516532593, 2.548191031241198, 4.31311028867865, 12.821065595467271, 16.31473936424301, 18.855503397940524, 10.900317396721608, 11.289496957149971, 3.572154602060744, 5.166475938999147, 1.453369315756714, 15.947222451282205, 2.0176952177633356, 9.380554484966918, 17.40298034140181, 3.302447507457291, 8.045720613940992, 8.664412639303464, 14.275092513347719, 14.291133579593918, 5.835350535237591, 3.7715822008596223, 2.3937620889937894, 19.32375366479398, 1.775793184332799, 6.973091564059075, 15.002869971247708, 18.27741010009897, 10.00438491882678, 13.863199592861905, 5.020660544664626, 15.159086545194455, 18.04296034021894, 8.308006140440654, 11.277764607222045, 4.092504374218504, 2.1617374136196, 16.69230791844036, 16.298473960615375, 1.2889588396838092, 15.188868154536676, 12.614045518304899, 3.3829576268688877, 12.428457329605227, 4.59701391487102, 5.855630719555545, 6.058262525805603, 0.2655710373297082, 18.9365554118362, 11.377840599735077, 16.08378664855447, 16.51269841044514, 13.151700207437827, 1.9810075383726544, 0.1283634204761186, 2.3712535854321204, 15.872657241574837, 19.69949414208044, 6.701154258078059, 10.554260177384053, 17.674591693537494, 9.803899359656077, 13.298221842527253, 7.789952392967767, 11.754230863137217, 0.7186227944612211, 3.906735435751645, 13.015751347404354, 13.157094001810531, 5.597052111254001, 4.758355682016456, 14.317977145328037, 7.340186872476762, 13.619596257069333, 4.424378992776425, 19.476635046810486, 4.534578399870641, 1.7831254441221933, 5.711043638055182, 2.1741805684914173, 11.672446772483362, 17.969847946257943, 3.6972720260179015, 1.120393342890802, 12.376798022987334, 19.67379787606673, 0.4076478759298152, 4.571381179543232, 3.9538180031179304, 3.698607487618859, 15.469441854631791, 4.9681297079312525, 7.413468005279902, 19.139835379032352, 4.772162061945271, 14.761059349080142, 1.0082250570987705, 10.472355693453315, 15.765144202413708, 6.381959117427187, 2.377920964657061, 10.570296932517794, 5.765525575190635, 12.168177455065344, 6.418524033721433, 4.6759868902540696, 9.399044606818947, 15.499630482553933, 16.0947110568933, 5.2149248935473675, 15.516988036569746, 2.9127554822284907, 17.93936279603155, 13.824298253270209, 5.527849638589992, 5.589096859138882, 3.103371511489297, 14.360468240620822, 11.150505196896345, 0.5855439476345148, 0.17829188523953654, 1.1919624063598433, 0.2382383927747056, 6.1243967210603545, 1.3565777371675214, 11.440723913934686, 13.96540619910295, 10.230841838215268, 4.3432994535441, 11.709281569819765, 5.960029252660355, 5.158654508859122, 2.0677993083959145, 4.08906216500613, 8.476965769910617, 18.972258588308904, 7.847821482554496, 19.1608227643056, 9.344362673694118, 16.808438400383984, 1.1510172936040464, 13.13867132577186, 16.853708643058297, 6.307636184613859, 3.63334842300032, 11.414178273708014, 17.48942139119936, 4.381351880051527, 6.436945210531504, 8.809786164358496, 5.37266733392332, 19.88696446606815, 9.23105233028786, 2.8997110739939402, 3.016167676927084, 3.6762351976321495, 14.531223627315548, 1.1623787493831572, 1.5320809687556025, 8.100428681011955, 3.5127719684640635, 3.1035010628411785, 12.922814349515095, 4.93900491465086, 0.2638652533768182, 10.448587310798327, 2.2325264489625285, 3.87734152598326, 4.92108871806998, 4.913232755827705, 1.4262633155451954, 2.703573508923478, 6.787063891944096, 16.879955029103414, 4.102405973666401, 4.012331578215214, 9.91038933342101, 1.53053477009635, 7.963535602830289, 6.436186016879009, 15.097011351159447, 2.152828399660651, 13.852660563972844, 11.328565009294397, 2.0466442405152474, 1.1817560999709253, 3.66249209854983, 7.7163307077946435, 11.345362449752965, 2.1359495971338394, 3.9005189368222637, 9.951804930566757, 6.5307539520849005, 0.2787948995625489, 14.709261640905432, 1.5113716261545762, 14.749564283475571, 16.744525956768083, 7.983017934254521, 4.15864423284366, 18.311656102314856, 13.060475099744963, 8.756209941645226, 14.737652306896488, 6.520955114354359, 15.159744158220098, 0.29594195634012443, 16.062850937888037, 11.251744700404467, 17.145776229515732, 8.892802839672013, 8.791740313183492, 14.156100024643658, 11.781172870239455, 18.03558951309033, 11.757965466950719, 0.03302478515608831, 17.69983018994431, 6.7233496118869285, 8.369926549402066, 9.7184595243673, 8.986604587318784, 19.8301122717684, 8.403120204583805, 5.1320266995654285, 16.411783267928964, 12.870031727943395, 16.846437833929617, 8.08949077130606, 10.57922844853302, 16.07653963409681, 12.801577185402405, 18.13106166435248, 11.876615980394442, 7.823325540644306, 15.003504225234973, 3.495212569813917, 11.805322522904852, 18.04521906335622, 19.83967594375885, 2.8694439381828274, 12.681825115975723, 13.521801821398899, 1.1894388913424714, 16.43752011748639, 12.59669028539223, 0.6415499434782568, 9.135683977640136, 14.607931815142708, 9.729760565347043, 3.794990988023965, 19.03508003224102, 4.276656671288029, 12.399445888504946, 15.73529513396943, 16.832855536524235, 0.49018962096198493, 19.17537701348717, 1.0400827271307822, 11.747177115217315, 5.912744270320216, 5.925163174760762, 5.247453291538891, 19.409665635891162, 7.322010555404786, 8.86505020951978, 6.6978751072244425, 18.670127525450088, 2.089842494902747, 16.510168748022316, 14.552698105254914, 17.32931616461817, 4.365909175843788, 16.991593032589822, 18.439913117833168, 1.9456238041247809, 2.3852415536629445, 1.4083713924288, 16.229201715539073, 13.029654594629296, 18.311690138790482, 14.763830526884075, 13.904839587407007, 5.681235924384181, 1.150727972654666, 16.812936611180803, 1.4709202571509605, 16.817714291788377, 14.278525421441206, 16.690691714949196, 3.7647274117186447, 7.291212046138784, 14.43810936601912, 11.998882680167004, 12.973269404069093, 3.189090220591504, 13.539826191922364, 3.16478327829808, 17.142185742939933, 15.995060013329866, 2.525511985670077, 19.214733077466338, 8.027573712563612, 0.9587839361976846, 4.269171779555152, 14.309769253319294, 5.781188029548543, 18.172766613994668, 14.798109610912187, 8.171749728578806, 11.296778023950552, 14.512977746785891, 11.267191105945571, 8.490468091917986, 0.8882404916116693, 9.128874555421492, 4.806690133121463, 0.5905982953366329, 8.202277434185907, 5.661673876648859, 14.770417735566326, 4.542509169909148, 15.494827661893275, 10.891712987528253, 10.902394180658249, 2.998474098931343, 0.9531383026899731, 13.774380801858337, 16.99643995593956, 6.522553650493772, 5.982485761875738, 4.5970279448405, 15.00014459609485, 18.771604709265134, 13.592495885542293, 14.574784816377843, 10.618749685805579, 0.027845282330634102, 16.977840243088426, 18.617371105791463, 9.73985375244184, 0.6180828362134627, 7.720085906507279, 6.10051861064828, 3.2108051619439193, 0.3915607851484748, 19.72198470561256, 8.393317958462525, 6.795578708539114, 0.5341007926487262, 14.922550335927394, 5.7226171478755035, 15.53957879086607, 6.8458068379569, 11.36418746287481, 2.7034910696842385, 7.591464405561348, 17.11900741701089, 12.855630815130825, 17.178928803001657, 2.2565537193844043, 12.458575251808998, 17.487897884397277, 7.189240135525214, 8.11528000543857, 9.608274419921305, 5.6373513849927654, 9.929209014269569, 18.69405991977697, 4.2759579848160385, 15.072534804990136, 6.158087125766574, 6.782732094604825, 16.404726635491148], "expected": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,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0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py new file mode 100644 index 000000000000..d5cadb567f70 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py @@ -0,0 +1,76 @@ +#!/usr/bin/env python +# +# @license Apache-2.0 +# +# Copyright (c) 2024 The Stdlib Authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Generate fixtures.""" + +import os +import json +import numpy as np + +# Get the file path: +FILE = os.path.realpath(__file__) + +# Extract the directory in which this file resides: +DIR = os.path.dirname(FILE) + + +def gen(lam, name): + """ + Generate fixture data and write to file. + + # Arguments + + * `lam`: shape parameter. + * `name::str`: output filename. + + # Examples + + ```python + python> lam = np.random.rand(1000) * 20 + python> gen(lam, "data.json") + ``` + """ + # Compute standard deviation values: + z = np.zeros(lam.shape) + + # Store data to be written to file as a dictionary: + data = { + "lambda": lam.tolist(), + "expected": z.tolist() + } + + # Based on the script directory, create an output filepath: + filepath = os.path.join(DIR, name) + + # Write the data to the output filepath as JSON: + with open(filepath, "w", encoding='utf-8') as outfile: + json.dump(data, outfile) + + # Include trailing newline: + with open(filepath, "a", encoding='utf-8') as outfile: + outfile.write("\n") + + +def main(): + """Generate fixture data.""" + lam = np.random.rand(1000) * 20.0 + gen(lam, "data.json") + + +if __name__ == "__main__": + main() diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js new file mode 100644 index 000000000000..883a852976ce --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js @@ -0,0 +1,72 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2024 The Stdlib Authors. +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ + +'use strict'; + +// MODULES // + +var tape = require( 'tape' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var mode = require( './../lib' ); + + +// FIXTURES // + +var data = require( './fixtures/python/data.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof mode, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for `lambda`, the function returns `NaN`', function test( t ) { + var v = mode( NaN ); + t.equal( isnan( v ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided a success probability `lambda` which is nonpositive, the function returns `NaN`', function test( t ) { + var v; + + v = mode( 0.0 ); + t.equal( isnan( v ), true, 'returns NaN' ); + + v = mode( -1.5 ); + t.equal( isnan( v ), true, 'returns NaN' ); + + t.end(); +}); + +tape( 'the function returns the mode of a Planck distribution', function test( t ) { + var expected; + var lambda; + var i; + var y; + + expected = data.expected; + lambda = data.lambda; + for ( i = 0; i < expected.length; i++ ) { + y = mode( lambda[ i ] ); + t.equal( y, expected[ i ], 'lambda: '+lambda[ i ]+', y: '+y+', expected: '+expected[ i ] ); + } + t.end(); +}); From ce635cac4023f4d9262e29cb725eb5b168ea1294 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Sun, 29 Dec 2024 14:34:17 +0000 Subject: [PATCH 2/6] chore: update copyright years --- .../@stdlib/stats/base/dists/planck/mode/examples/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js index c273daefd7f8..71997ddb35cf 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2018 The Stdlib Authors. +* Copyright (c) 2024 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 87767934345366a1985b056f2d853fd3eb9f546f Mon Sep 17 00:00:00 2001 From: Jaysukh-409 Date: Sun, 29 Dec 2024 20:16:03 +0530 Subject: [PATCH 3/6] 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: na - 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: na - task: lint_python status: passed - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- .../stats/base/dists/planck/mode/test/fixtures/python/runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py index d5cadb567f70..424e9f709f40 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py @@ -45,7 +45,7 @@ def gen(lam, name): python> gen(lam, "data.json") ``` """ - # Compute standard deviation values: + # Compute mode values: z = np.zeros(lam.shape) # Store data to be written to file as a dictionary: From 72db3f6e1dd73d1566d5d67e4b6e25b8a44c2d55 Mon Sep 17 00:00:00 2001 From: Jaysukh-409 Date: Mon, 30 Dec 2024 13:03:25 +0530 Subject: [PATCH 4/6] test: update the test for constant mode value --- 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: na - 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: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: passed --- --- .../mode/test/fixtures/python/data.json | 1 - .../mode/test/fixtures/python/runner.py | 76 ------------------- .../stats/base/dists/planck/mode/test/test.js | 21 ++--- 3 files changed, 8 insertions(+), 90 deletions(-) delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/data.json delete mode 100644 lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/data.json b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/data.json deleted file mode 100644 index 2d87a66dbbff..000000000000 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/data.json +++ /dev/null @@ -1 +0,0 @@ -{"lambda": [11.31455620449707, 6.26448886761384, 19.795095612366048, 12.89620797244307, 17.45502427924005, 19.821275423021493, 3.1440914554507793, 4.3439362314902885, 11.89888381093595, 0.7920386573931704, 17.87091225743653, 13.12535051419176, 19.72946881181968, 15.313135064548133, 1.9376752528234475, 18.157660727309544, 7.392646319205491, 15.798594104023467, 2.445326443236655, 11.363182763837077, 6.443461034318203, 15.436443130730229, 7.247782852306061, 8.669654603614298, 16.940746125871662, 5.7326532695035715, 15.799088027583457, 13.998941211976089, 5.937437197663549, 3.8294554023084193, 9.251798405091673, 0.7716296004941703, 17.28901604159516, 5.423416166631494, 5.231044142407497, 9.547381719896993, 5.573151787659523, 0.353655350250357, 4.972290877372332, 5.47863025533456, 12.609659740360739, 1.1462482660449624, 17.22427799371895, 8.148080734989737, 10.898081198709832, 8.118386674424238, 19.698414834882747, 17.144320635314198, 0.5248703069731375, 6.907884499896147, 18.055746163089356, 14.090183268567205, 16.660596291723188, 1.7447863701439092, 8.191535264994162, 1.7469469454038045, 16.587042198591135, 8.454974146471741, 5.667414266326776, 15.766204291761053, 7.576359281573781, 6.569087037684456, 9.903647309627727, 9.290575480550743, 6.235687090075808, 9.330480766626167, 17.50172788410798, 7.2848701867712755, 2.63572768275365, 6.253673059994831, 6.067176386442483, 17.040780748235925, 3.6062323691459808, 15.996210754666185, 6.994536857264084, 5.2667419002179905, 14.563729773989717, 11.425300569722436, 19.659692692864997, 8.473870819272413, 15.800565097480035, 17.055194405410706, 7.007524098847073, 0.9335679442568745, 15.312774879969284, 15.636216319767843, 19.01570749562167, 8.048550317414058, 6.474817299229862, 15.725397401504972, 4.8326905437659455, 12.460095991761861, 8.35591369197334, 16.731475968619062, 3.5277020621161514, 7.329518516004894, 1.3251505389128337, 13.676476496221149, 17.67647806612516, 7.217970581366677, 15.60198480193879, 17.462482147707853, 9.661735457626444, 2.837069899432716, 0.9958713916909434, 11.484221237633855, 9.832011266894202, 18.85071388548591, 3.4322007811011934, 4.485208691289431, 4.996110356028378, 12.742011272400845, 7.004915090842645, 3.1222361072913607, 17.851053937270816, 17.643220763803782, 1.800558725111192, 13.230273592881236, 17.66818412451007, 5.964328592672128, 7.370114705881736, 5.431196935779507, 12.298214877591017, 19.717691517235444, 3.0153511603489958, 18.48739401526202, 18.930647595192077, 13.913040166776824, 13.563582563482948, 5.8867360826099, 1.0486716223321069, 15.625724298656259, 2.756415473481464, 3.8066456551890338, 13.416766365811297, 14.000023262773693, 6.547920741082529, 11.860067306707814, 1.4273085897696336, 8.054015758479407, 14.629599092115278, 9.915089380739781, 6.219792309243253, 4.499956387457673, 4.395028318746328, 16.96940649020504, 6.198195360450431, 6.210379173005151, 7.377575277005921, 13.50556775848014, 10.899777287843493, 8.6246518372946, 6.170938648897173, 4.010219824815506, 6.185989423288887, 15.126889724995245, 17.992142566507127, 6.343364664298578, 19.11491669211187, 4.112001847088431, 18.910014681282895, 7.368545167079574, 4.991687425668488, 15.559133299616626, 3.336186628799198, 6.252495606864173, 10.872192590539505, 8.606507214287422, 2.2073442957169576, 5.9997278549057675, 14.747642298401109, 1.5877975140206213, 14.993758769067638, 17.388681209084996, 14.191752027074621, 2.6736348068619886, 17.617264118255445, 8.68389690702465, 7.063955307304179, 15.903133488758623, 5.595181119735426, 7.069856205053096, 5.145948434220786, 9.813646061637535, 7.127190231328305, 2.231264611694186, 16.55570581363374, 4.590035455675203, 13.661864346278831, 3.5162935183108024, 8.25660236459447, 18.104293056113324, 17.39698232687987, 8.579391825563071, 3.6090079046767, 2.5945535971498757, 5.7988740589223315, 9.259363793115776, 17.206021566687127, 15.943962355621181, 1.857221180216575, 2.9820301418172535, 14.658727934408585, 7.110503040726566, 0.7728084891712039, 16.365363903002805, 1.5817939116607027, 12.164554788086816, 18.37107925493966, 13.611490423723584, 17.56986750831881, 12.653791122865991, 2.0833617692680084, 2.4093126723831837, 7.459886869949861, 10.292828000698591, 7.285578272886852, 4.665165233007464, 13.400253180008876, 18.344340567784542, 12.893536032970221, 6.5517181473778185, 12.374704346764297, 19.540482310952516, 15.49192371279144, 15.015573726744853, 16.73576176816011, 19.091142154928434, 5.100984450419439, 12.595713148700096, 11.49699776628819, 9.51151276610464, 14.665305748862005, 17.275434892522007, 11.782967148932444, 8.352956700790235, 2.2485288745728504, 15.051253212001933, 10.187909601240426, 1.7499328978552353, 12.16599579758957, 13.892900830440611, 6.1094104495334856, 13.26106960423971, 7.033142953054439, 2.740975841853255, 3.4014000615735185, 3.8965589915126952, 16.526892545679132, 6.611523798434373, 10.78407187579009, 0.8475615427061634, 12.206557834223577, 7.012677811516004, 17.71353316700114, 1.2094308997688308, 5.893461444500745, 14.525831844308321, 4.42469299122113, 17.865907363919394, 2.8338444465700796, 11.098945996871132, 0.6723693686260956, 13.76843359702427, 18.211209354817363, 16.98801173637381, 2.659255240270171, 16.92429797287248, 0.9781545775886769, 7.376027884772965, 0.8321947686977205, 19.52232897733205, 1.5999754163611146, 17.788116734476702, 16.12050382746676, 17.365203042179843, 8.233706816017355, 3.014726277089579, 2.9627406893068753, 3.2119139119216378, 1.9684244369254622, 14.885354104820951, 0.09668780583564685, 19.04030943017377, 6.550165484801436, 14.970487940669656, 18.2531329825216, 19.46633411766615, 18.0258359641318, 17.44506562260389, 14.603590134856725, 5.405894333829259, 7.25203231604393, 1.4826274701697462, 4.010006338902246, 4.5305601680045555, 5.2943410918063964, 13.377103932235618, 14.662240432885651, 13.948989246516142, 10.349319400412005, 2.7315711475009485, 10.000770668226082, 7.950754369007688, 12.377845158425663, 14.304990304292707, 12.06668461724828, 9.061934322192275, 16.82324849198669, 10.226473577660283, 5.199407738125426, 14.895587712591984, 10.82919612092325, 14.680988070465435, 5.284047561123106, 9.576567559693247, 1.9926241324768945, 3.6450797708533034, 0.8857999772135905, 14.732127604847037, 7.286036407926229, 11.108343461871666, 4.0155653646106, 12.482050848610015, 8.885553815556218, 18.257431811202743, 2.1638135529220337, 18.965653543915987, 19.203180481848257, 8.862952492472019, 18.697732526640486, 17.752119083175096, 0.0810710728015529, 7.949372025129633, 2.088818796166758, 5.122525351742704, 14.452138940125614, 6.459674336975674, 5.85337477047839, 5.19242718574991, 1.6554129821060126, 10.592962454579313, 10.738295930784691, 11.417057586118158, 0.5053352369664532, 17.942734718582315, 3.010314469080384, 4.765588484292116, 0.69247109054551, 14.928224154750025, 3.1431271588636367, 0.2414809554500752, 13.226091371173549, 12.457191083717255, 14.403842152796454, 12.628662101516069, 1.0170981383917477, 16.219495776307717, 12.009296917298828, 1.4134445195773515, 8.150289815283232, 11.986528502796407, 9.954880630621899, 2.2328125939399612, 4.259929370140103, 3.203212731162266, 11.275468654354846, 17.053987382120017, 12.687896677629942, 4.538840355775613, 11.413175191318315, 1.2623652377761374, 0.5391633684507235, 8.912680016476022, 9.854854970264192, 1.3479347401005781, 8.814776731635106, 11.71314115896389, 5.550248713947388, 8.592531083187911, 12.61244964945248, 18.298318749277215, 15.444738943621665, 5.38569236978625, 19.852049495990624, 14.242862298533929, 5.6801872132327835, 15.625058491602285, 11.183585086761036, 14.029003781527278, 6.428592591379356, 18.2484403850395, 14.830712986076332, 3.51274665312439, 19.385978323234074, 15.501360223954322, 16.092541676325858, 13.525418813858895, 1.6885000131921712, 2.237631081430649, 18.332037743083728, 9.69305660112321, 0.6917618917010082, 4.1908281973258, 13.73096547504889, 5.1460510846477465, 13.914852652917354, 2.0148921213806315, 6.639225726254423, 2.9366106511802825, 10.887155006559057, 5.697709884960771, 16.457920652363228, 17.013512366970648, 5.706255557347461, 18.845024571492306, 12.423277660884565, 11.152729204679622, 11.189053688929855, 13.246083124760105, 10.3329025953622, 8.853326092690196, 18.20466060044456, 11.733225283306874, 8.03683642897209, 6.454241834281296, 6.383612602958387, 10.237353251435898, 13.233521341993953, 12.748116715353534, 12.80701175881603, 10.615625246186585, 2.558945553109986, 15.161923314474244, 15.89980183356871, 11.802265217459862, 0.3394070096195523, 19.285313094171205, 16.678377983684825, 12.985078706005515, 2.1724549184242004, 19.05356430492737, 5.379362967265862, 16.024771087773672, 19.578819945257695, 0.07801036217379265, 0.5252073983754646, 1.4053451694722563, 11.44735070375009, 8.27748389034924, 16.137710627824376, 18.29832041793001, 14.392223065221073, 8.487494149296804, 18.70042781174969, 1.9284963129713306, 18.92032223351957, 12.59219883256918, 14.997708635694833, 19.489545947619604, 5.479645505871691, 5.928035225959565, 17.16410622908127, 13.587677458846452, 18.87445585393618, 13.199658001330906, 10.40982765142315, 2.713401844081935, 11.432935990858455, 12.295464609900769, 1.7614602065329699, 6.989074037740261, 5.124541096292914, 4.935798483241256, 18.14954439020935, 17.590139170663882, 13.013106497385136, 12.371011169862465, 11.190551402356357, 12.795133812048027, 2.088261731517125, 5.120733584358117, 9.88408814988743, 16.605786400588926, 8.67822139340907, 7.536129137795338, 5.508489493372403, 17.0118608824199, 11.802142549786135, 8.299348063011351, 10.573213421952556, 7.080500419045903, 18.093564978385547, 11.106129125454478, 18.253327006123197, 4.564739558480877, 19.764677286677713, 19.21637386869824, 3.270434667237412, 0.7899583961714618, 8.228459343368424, 11.14436794534888, 18.503678630429793, 0.9023982366861261, 17.004725399760552, 12.76593777342111, 19.53589220124516, 0.8283330714990789, 18.109840842583974, 19.046610758551953, 19.030506343684532, 14.715395754595686, 13.970079310629515, 14.12984681721422, 7.247928523486755, 6.611202592187011, 13.175181783331729, 3.7809676931254166, 3.4380391310535496, 11.588802565518264, 15.127656004502834, 5.302094441835241, 14.753102262962074, 14.04580162370232, 14.839453465337781, 19.026398397380852, 14.611125434113026, 12.662638688740754, 6.571234292882197, 9.969521291213612, 13.0169885999789, 8.30186873237494, 13.185473410571609, 9.13727249266951, 15.239795568558378, 15.61921457781186, 13.766159785811604, 10.442975599707127, 5.632261390544, 12.24679167678699, 9.017728323046883, 5.419779239007201, 2.4336434714455857, 10.950899902742746, 4.227654173267428, 3.8443506524023485, 12.174047095817286, 7.759174709185615, 9.50814914902751, 7.937269212139393, 6.62719539340425, 9.004744934992232, 9.026300384537521, 7.798644600262663, 14.517933520994788, 7.112283887608437, 9.93786475475979, 16.323315149956382, 18.632852565907495, 9.124885592903896, 3.1899575630089827, 19.685648848502296, 19.086686451573268, 11.480176771570523, 13.547577076340659, 0.382352442581122, 15.554940398683277, 12.16771283001626, 2.360001912099343, 4.657703815145997, 12.523067878283545, 8.349349184228656, 18.847631113727996, 10.371092442346638, 0.8920556130433832, 0.08027732141458355, 10.655870751403445, 16.31069473930616, 12.261267648351335, 4.1431586279022365, 18.08474562052387, 18.951328087513147, 16.468760638120465, 19.819174010579516, 11.911334807886574, 0.19853913345437624, 3.925188122792005, 2.9316038559956747, 6.796958816462528, 15.389603303576106, 3.8673162419599105, 8.010736707003828, 10.784229327215755, 19.39041980309238, 16.52144932692926, 19.01207872155365, 5.194013933761983, 11.91507756801804, 3.1520556477180883, 17.89034017518458, 11.122848544665196, 6.363775940450463, 7.324271794677815, 17.03598182044248, 1.6479085366602608, 8.74511420042735, 16.064706397542473, 19.76022683037122, 13.086316508162426, 3.0162075631270557, 4.044642856386362, 2.2691730146963285, 16.920395947118823, 12.271008220119175, 0.08736613763401513, 9.99063810022513, 13.22669481273693, 6.999431073672932, 6.905837999624918, 19.587203173398, 7.582917031197236, 6.108911134468853, 15.516592088348201, 17.499232764763924, 12.802537609366635, 7.389937800227033, 11.77085516532593, 2.548191031241198, 4.31311028867865, 12.821065595467271, 16.31473936424301, 18.855503397940524, 10.900317396721608, 11.289496957149971, 3.572154602060744, 5.166475938999147, 1.453369315756714, 15.947222451282205, 2.0176952177633356, 9.380554484966918, 17.40298034140181, 3.302447507457291, 8.045720613940992, 8.664412639303464, 14.275092513347719, 14.291133579593918, 5.835350535237591, 3.7715822008596223, 2.3937620889937894, 19.32375366479398, 1.775793184332799, 6.973091564059075, 15.002869971247708, 18.27741010009897, 10.00438491882678, 13.863199592861905, 5.020660544664626, 15.159086545194455, 18.04296034021894, 8.308006140440654, 11.277764607222045, 4.092504374218504, 2.1617374136196, 16.69230791844036, 16.298473960615375, 1.2889588396838092, 15.188868154536676, 12.614045518304899, 3.3829576268688877, 12.428457329605227, 4.59701391487102, 5.855630719555545, 6.058262525805603, 0.2655710373297082, 18.9365554118362, 11.377840599735077, 16.08378664855447, 16.51269841044514, 13.151700207437827, 1.9810075383726544, 0.1283634204761186, 2.3712535854321204, 15.872657241574837, 19.69949414208044, 6.701154258078059, 10.554260177384053, 17.674591693537494, 9.803899359656077, 13.298221842527253, 7.789952392967767, 11.754230863137217, 0.7186227944612211, 3.906735435751645, 13.015751347404354, 13.157094001810531, 5.597052111254001, 4.758355682016456, 14.317977145328037, 7.340186872476762, 13.619596257069333, 4.424378992776425, 19.476635046810486, 4.534578399870641, 1.7831254441221933, 5.711043638055182, 2.1741805684914173, 11.672446772483362, 17.969847946257943, 3.6972720260179015, 1.120393342890802, 12.376798022987334, 19.67379787606673, 0.4076478759298152, 4.571381179543232, 3.9538180031179304, 3.698607487618859, 15.469441854631791, 4.9681297079312525, 7.413468005279902, 19.139835379032352, 4.772162061945271, 14.761059349080142, 1.0082250570987705, 10.472355693453315, 15.765144202413708, 6.381959117427187, 2.377920964657061, 10.570296932517794, 5.765525575190635, 12.168177455065344, 6.418524033721433, 4.6759868902540696, 9.399044606818947, 15.499630482553933, 16.0947110568933, 5.2149248935473675, 15.516988036569746, 2.9127554822284907, 17.93936279603155, 13.824298253270209, 5.527849638589992, 5.589096859138882, 3.103371511489297, 14.360468240620822, 11.150505196896345, 0.5855439476345148, 0.17829188523953654, 1.1919624063598433, 0.2382383927747056, 6.1243967210603545, 1.3565777371675214, 11.440723913934686, 13.96540619910295, 10.230841838215268, 4.3432994535441, 11.709281569819765, 5.960029252660355, 5.158654508859122, 2.0677993083959145, 4.08906216500613, 8.476965769910617, 18.972258588308904, 7.847821482554496, 19.1608227643056, 9.344362673694118, 16.808438400383984, 1.1510172936040464, 13.13867132577186, 16.853708643058297, 6.307636184613859, 3.63334842300032, 11.414178273708014, 17.48942139119936, 4.381351880051527, 6.436945210531504, 8.809786164358496, 5.37266733392332, 19.88696446606815, 9.23105233028786, 2.8997110739939402, 3.016167676927084, 3.6762351976321495, 14.531223627315548, 1.1623787493831572, 1.5320809687556025, 8.100428681011955, 3.5127719684640635, 3.1035010628411785, 12.922814349515095, 4.93900491465086, 0.2638652533768182, 10.448587310798327, 2.2325264489625285, 3.87734152598326, 4.92108871806998, 4.913232755827705, 1.4262633155451954, 2.703573508923478, 6.787063891944096, 16.879955029103414, 4.102405973666401, 4.012331578215214, 9.91038933342101, 1.53053477009635, 7.963535602830289, 6.436186016879009, 15.097011351159447, 2.152828399660651, 13.852660563972844, 11.328565009294397, 2.0466442405152474, 1.1817560999709253, 3.66249209854983, 7.7163307077946435, 11.345362449752965, 2.1359495971338394, 3.9005189368222637, 9.951804930566757, 6.5307539520849005, 0.2787948995625489, 14.709261640905432, 1.5113716261545762, 14.749564283475571, 16.744525956768083, 7.983017934254521, 4.15864423284366, 18.311656102314856, 13.060475099744963, 8.756209941645226, 14.737652306896488, 6.520955114354359, 15.159744158220098, 0.29594195634012443, 16.062850937888037, 11.251744700404467, 17.145776229515732, 8.892802839672013, 8.791740313183492, 14.156100024643658, 11.781172870239455, 18.03558951309033, 11.757965466950719, 0.03302478515608831, 17.69983018994431, 6.7233496118869285, 8.369926549402066, 9.7184595243673, 8.986604587318784, 19.8301122717684, 8.403120204583805, 5.1320266995654285, 16.411783267928964, 12.870031727943395, 16.846437833929617, 8.08949077130606, 10.57922844853302, 16.07653963409681, 12.801577185402405, 18.13106166435248, 11.876615980394442, 7.823325540644306, 15.003504225234973, 3.495212569813917, 11.805322522904852, 18.04521906335622, 19.83967594375885, 2.8694439381828274, 12.681825115975723, 13.521801821398899, 1.1894388913424714, 16.43752011748639, 12.59669028539223, 0.6415499434782568, 9.135683977640136, 14.607931815142708, 9.729760565347043, 3.794990988023965, 19.03508003224102, 4.276656671288029, 12.399445888504946, 15.73529513396943, 16.832855536524235, 0.49018962096198493, 19.17537701348717, 1.0400827271307822, 11.747177115217315, 5.912744270320216, 5.925163174760762, 5.247453291538891, 19.409665635891162, 7.322010555404786, 8.86505020951978, 6.6978751072244425, 18.670127525450088, 2.089842494902747, 16.510168748022316, 14.552698105254914, 17.32931616461817, 4.365909175843788, 16.991593032589822, 18.439913117833168, 1.9456238041247809, 2.3852415536629445, 1.4083713924288, 16.229201715539073, 13.029654594629296, 18.311690138790482, 14.763830526884075, 13.904839587407007, 5.681235924384181, 1.150727972654666, 16.812936611180803, 1.4709202571509605, 16.817714291788377, 14.278525421441206, 16.690691714949196, 3.7647274117186447, 7.291212046138784, 14.43810936601912, 11.998882680167004, 12.973269404069093, 3.189090220591504, 13.539826191922364, 3.16478327829808, 17.142185742939933, 15.995060013329866, 2.525511985670077, 19.214733077466338, 8.027573712563612, 0.9587839361976846, 4.269171779555152, 14.309769253319294, 5.781188029548543, 18.172766613994668, 14.798109610912187, 8.171749728578806, 11.296778023950552, 14.512977746785891, 11.267191105945571, 8.490468091917986, 0.8882404916116693, 9.128874555421492, 4.806690133121463, 0.5905982953366329, 8.202277434185907, 5.661673876648859, 14.770417735566326, 4.542509169909148, 15.494827661893275, 10.891712987528253, 10.902394180658249, 2.998474098931343, 0.9531383026899731, 13.774380801858337, 16.99643995593956, 6.522553650493772, 5.982485761875738, 4.5970279448405, 15.00014459609485, 18.771604709265134, 13.592495885542293, 14.574784816377843, 10.618749685805579, 0.027845282330634102, 16.977840243088426, 18.617371105791463, 9.73985375244184, 0.6180828362134627, 7.720085906507279, 6.10051861064828, 3.2108051619439193, 0.3915607851484748, 19.72198470561256, 8.393317958462525, 6.795578708539114, 0.5341007926487262, 14.922550335927394, 5.7226171478755035, 15.53957879086607, 6.8458068379569, 11.36418746287481, 2.7034910696842385, 7.591464405561348, 17.11900741701089, 12.855630815130825, 17.178928803001657, 2.2565537193844043, 12.458575251808998, 17.487897884397277, 7.189240135525214, 8.11528000543857, 9.608274419921305, 5.6373513849927654, 9.929209014269569, 18.69405991977697, 4.2759579848160385, 15.072534804990136, 6.158087125766574, 6.782732094604825, 16.404726635491148], "expected": [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,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0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py deleted file mode 100644 index 424e9f709f40..000000000000 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/fixtures/python/runner.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python -# -# @license Apache-2.0 -# -# Copyright (c) 2024 The Stdlib Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Generate fixtures.""" - -import os -import json -import numpy as np - -# Get the file path: -FILE = os.path.realpath(__file__) - -# Extract the directory in which this file resides: -DIR = os.path.dirname(FILE) - - -def gen(lam, name): - """ - Generate fixture data and write to file. - - # Arguments - - * `lam`: shape parameter. - * `name::str`: output filename. - - # Examples - - ```python - python> lam = np.random.rand(1000) * 20 - python> gen(lam, "data.json") - ``` - """ - # Compute mode values: - z = np.zeros(lam.shape) - - # Store data to be written to file as a dictionary: - data = { - "lambda": lam.tolist(), - "expected": z.tolist() - } - - # Based on the script directory, create an output filepath: - filepath = os.path.join(DIR, name) - - # Write the data to the output filepath as JSON: - with open(filepath, "w", encoding='utf-8') as outfile: - json.dump(data, outfile) - - # Include trailing newline: - with open(filepath, "a", encoding='utf-8') as outfile: - outfile.write("\n") - - -def main(): - """Generate fixture data.""" - lam = np.random.rand(1000) * 20.0 - gen(lam, "data.json") - - -if __name__ == "__main__": - main() diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js index 883a852976ce..0b7ada2bc52c 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js @@ -22,14 +22,10 @@ var tape = require( 'tape' ); var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var uniform = require( '@stdlib/random/array/uniform' ); var mode = require( './../lib' ); -// FIXTURES // - -var data = require( './fixtures/python/data.json' ); - - // TESTS // tape( 'main export is a function', function test( t ) { @@ -48,25 +44,24 @@ tape( 'if provided a success probability `lambda` which is nonpositive, the func var v; v = mode( 0.0 ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); v = mode( -1.5 ); - t.equal( isnan( v ), true, 'returns NaN' ); + t.equal( isnan( v ), true, 'returns expected value' ); t.end(); }); -tape( 'the function returns the mode of a Planck distribution', function test( t ) { - var expected; +tape( 'the function returns `0.0` as the mode of a Planck distribution', function test( t ) { var lambda; var i; var y; - expected = data.expected; - lambda = data.lambda; - for ( i = 0; i < expected.length; i++ ) { + lambda = uniform( 10, 0.1, 10.0 ); + + for ( i = 0; i < lambda.length; i++ ) { y = mode( lambda[ i ] ); - t.equal( y, expected[ i ], 'lambda: '+lambda[ i ]+', y: '+y+', expected: '+expected[ i ] ); + t.equal( y, 0.0, 'returns expected value' ); } t.end(); }); From fc3ada86b360c85502fe8349f637b4f150fa9b41 Mon Sep 17 00:00:00 2001 From: stdlib-bot <82920195+stdlib-bot@users.noreply.github.com> Date: Thu, 2 Jan 2025 06:56:03 +0000 Subject: [PATCH 5/6] chore: update copyright years --- lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md | 2 +- .../@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.js | 2 +- .../@stdlib/stats/base/dists/planck/mode/docs/types/index.d.ts | 2 +- .../@stdlib/stats/base/dists/planck/mode/docs/types/test.ts | 2 +- .../@stdlib/stats/base/dists/planck/mode/examples/index.js | 2 +- .../@stdlib/stats/base/dists/planck/mode/lib/index.js | 2 +- .../@stdlib/stats/base/dists/planck/mode/lib/main.js | 2 +- .../@stdlib/stats/base/dists/planck/mode/test/test.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md index 395af5d42579..88cc169134f0 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md @@ -2,7 +2,7 @@ @license Apache-2.0 -Copyright (c) 2024 The Stdlib Authors. +Copyright (c) 2025 The Stdlib Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.js index d5bfd6edf15a..8e8500b8b07b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.js +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/benchmark/benchmark.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/index.d.ts index bbbf8ef99d5a..488fb5289de0 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/index.d.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/index.d.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/test.ts index 4c72eb5a7517..a1f70068852e 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/test.ts +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/docs/types/test.ts @@ -1,7 +1,7 @@ /* * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js index 71997ddb35cf..987223b2b815 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/examples/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/index.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/index.js index 97ddf9a76393..06b9e6b178ba 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/index.js +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/index.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/main.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/main.js index 15eb391ff29f..59a3282ae45b 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/main.js +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/lib/main.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js index 0b7ada2bc52c..b5f0b4b2a2aa 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js @@ -1,7 +1,7 @@ /** * @license Apache-2.0 * -* Copyright (c) 2024 The Stdlib Authors. +* Copyright (c) 2025 The Stdlib Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 9168424b15ee9ae0816090ae47be0e7ce842920b Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Thu, 2 Jan 2025 00:13:41 -0800 Subject: [PATCH 6/6] 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: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - 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 --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na --- --- lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md | 2 +- .../@stdlib/stats/base/dists/planck/mode/test/test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md index 88cc169134f0..0d62c5c213a4 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/README.md @@ -62,7 +62,7 @@ v = mode( 1.5 ); // returns 0 ``` -If provided a success probability `lambda` is nonpositve or `NaN`, the function returns `NaN`. +If provided a shape parameter `lambda` is nonpositive or `NaN`, the function returns `NaN`. ```javascript var v = mode( NaN ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js index b5f0b4b2a2aa..1a9f3da7a9e6 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js +++ b/lib/node_modules/@stdlib/stats/base/dists/planck/mode/test/test.js @@ -40,7 +40,7 @@ tape( 'if provided `NaN` for `lambda`, the function returns `NaN`', function tes t.end(); }); -tape( 'if provided a success probability `lambda` which is nonpositive, the function returns `NaN`', function test( t ) { +tape( 'if provided a shape parameter `lambda` which is nonpositive, the function returns `NaN`', function test( t ) { var v; v = mode( 0.0 );