From d59ec9371329e1f6539ee0a1ea94627b9cdb01cb Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Mon, 2 Mar 2026 13:05:47 +0530 Subject: [PATCH 1/2] feat: add `stats/base/dists/anglit/mean` --- 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: passed - task: lint_c_examples status: passed - task: lint_c_benchmarks status: passed - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: passed - task: lint_license_headers status: passed --- --- .../stats/base/dists/anglit/mean/README.md | 247 ++++++++++++++++++ .../dists/anglit/mean/benchmark/benchmark.js | 59 +++++ .../anglit/mean/benchmark/benchmark.native.js | 69 +++++ .../dists/anglit/mean/benchmark/c/Makefile | 146 +++++++++++ .../dists/anglit/mean/benchmark/c/benchmark.c | 141 ++++++++++ .../stats/base/dists/anglit/mean/binding.gyp | 170 ++++++++++++ .../base/dists/anglit/mean/docs/repl.txt | 37 +++ .../dists/anglit/mean/docs/types/index.d.ts | 57 ++++ .../base/dists/anglit/mean/docs/types/test.ts | 56 ++++ .../dists/anglit/mean/examples/c/Makefile | 146 +++++++++++ .../dists/anglit/mean/examples/c/example.c | 40 +++ .../base/dists/anglit/mean/examples/index.js | 31 +++ .../stats/base/dists/anglit/mean/include.gypi | 53 ++++ .../stdlib/stats/base/dists/anglit/mean.h | 38 +++ .../stats/base/dists/anglit/mean/lib/index.js | 43 +++ .../stats/base/dists/anglit/mean/lib/main.js | 69 +++++ .../base/dists/anglit/mean/lib/native.js | 63 +++++ .../base/dists/anglit/mean/manifest.json | 77 ++++++ .../stats/base/dists/anglit/mean/package.json | 70 +++++ .../stats/base/dists/anglit/mean/src/Makefile | 70 +++++ .../stats/base/dists/anglit/mean/src/addon.c | 22 ++ .../stats/base/dists/anglit/mean/src/main.c | 42 +++ .../mean/test/fixtures/python/data.json | 1 + .../mean/test/fixtures/python/large_mu.json | 1 + .../test/fixtures/python/large_sigma.json | 1 + .../mean/test/fixtures/python/runner.py | 105 ++++++++ .../mean/test/fixtures/python/small_mu.json | 1 + .../test/fixtures/python/small_sigma.json | 1 + .../stats/base/dists/anglit/mean/test/test.js | 162 ++++++++++++ .../dists/anglit/mean/test/test.native.js | 170 ++++++++++++ 30 files changed, 2188 insertions(+) create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/README.md create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/benchmark.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/benchmark.native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/c/benchmark.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/binding.gyp create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/repl.txt create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/types/index.d.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/types/test.ts create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/c/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/c/example.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/include.gypi create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/include/stdlib/stats/base/dists/anglit/mean.h create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/lib/index.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/lib/main.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/lib/native.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/manifest.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/package.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/Makefile create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/addon.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/main.c create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/data.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/large_mu.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/large_sigma.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/runner.py create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/small_mu.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/small_sigma.json create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.js create mode 100644 lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.native.js diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/README.md b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/README.md new file mode 100644 index 000000000000..f803162859b1 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/README.md @@ -0,0 +1,247 @@ + + +# Mean + +> [Anglit][anglit-distribution] distribution [expected value][mean]. + + + +
+ +The [mean][mean] for a [Anglit][anglit-distribution] random variable with location parameter `mu` and scale parameter `sigma` is + + + +```math +\mathbb{E}\left[ X \right] = \mu +``` + + + +
+ + + + + +
+ +## Usage + +```javascript +var mean = require( '@stdlib/stats/base/dists/anglit/mean' ); +``` + +#### mean( mu, sigma ) + +Returns the [expected value][mean] for a [Anglit][anglit-distribution] distribution with location parameter `mu` and scale parameter `sigma`. + +```javascript +var y = mean( 2.0, 1.0 ); +// returns 2.0 + +y = mean( 0.0, 1.0 ); +// returns 0.0 + +y = mean( -1.0, 4.0 ); +// returns -1.0 +``` + +If provided `NaN` as any argument, the function returns `NaN`. + +```javascript +var y = mean( NaN, 1.0 ); +// returns NaN + +y = mean( 0.0, NaN ); +// returns NaN +``` + +If provided `sigma <= 0`, the function returns `NaN`. + +```javascript +var y = mean( 0.0, 0.0 ); +// returns NaN + +y = mean( 0.0, -1.0 ); +// returns NaN +``` + +
+ + + + + +
+ +
+ + + + + +
+ +## Examples + + + +```javascript +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var mean = require( '@stdlib/stats/base/dists/anglit/mean' ); + +var opts = { + 'dtype': 'float64' +}; +var mu = uniform( 10, -5.0, 5.0, opts ); +var sigma = uniform( 10, 0.1, 20.0, opts ); + +logEachMap( 'µ: %lf, sigma: %lf, E(X;µ,sigma): %lf', mu, sigma, mean ); +``` + +
+ + + + + +* * * + +
+ +## C APIs + + + +
+ +
+ + + + + +
+ +### Usage + +```c +#include "stdlib/stats/base/dists/anglit/mean.h" +``` + +#### stdlib_base_dists_anglit_mean( mu, sigma ) + +Returns the [expected value][mean] for a [Anglit][anglit-distribution] distribution with location parameter `mu` and scale parameter `sigma`. + +```c +double out = stdlib_base_dists_anglit_mean( 2.0, 1.0 ); +// returns 2.0 +``` + +The function accepts the following arguments: + +- **mu**: `[in] double` location parameter. +- **sigma**: `[in] double` scale parameter. + +```c +double stdlib_base_dists_anglit_mean( const double mu, const double sigma ); +``` + +
+ + + + + +
+ +
+ + + + + +
+ +### Examples + +```c +#include "stdlib/stats/base/dists/anglit/mean.h" +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +int main( void ) { + double mu; + double sigma; + double y; + int i; + + for ( i = 0; i < 10; i++ ) { + mu = random_uniform( -5.0, 5.0 ); + sigma = random_uniform( 0.1, 20.0 ); + y = stdlib_base_dists_anglit_mean( mu, sigma ); + printf( "µ: %lf, sigma: %lf, E(X;µ,sigma): %lf\n", mu, sigma, y ); + } +} +``` + +
+ + + +
+ + + + + +
+ +
+ + + + + + + + + + + + + + diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/benchmark.js b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/benchmark.js new file mode 100644 index 000000000000..31364bf11a43 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/benchmark.js @@ -0,0 +1,59 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 EPS = require( '@stdlib/constants/float64/eps' ); +var pkg = require( './../package.json' ).name; +var mean = require( './../lib' ); + + +// MAIN // + +bench( pkg, function benchmark( b ) { + var sigma; + var opts; + var mu; + var y; + var i; + + opts = { + 'dtype': 'float64' + }; + mu = uniform( 100, -50.0, 50.0, opts ); + sigma = uniform( 100, EPS, 20.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = mean( mu[ i % mu.length ], sigma[ i % sigma.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/anglit/mean/benchmark/benchmark.native.js b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/benchmark.native.js new file mode 100644 index 000000000000..c489f14663d0 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/benchmark.native.js @@ -0,0 +1,69 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 resolve = require( 'path' ).resolve; +var bench = require( '@stdlib/bench' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var EPS = require( '@stdlib/constants/float64/eps' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var format = require( '@stdlib/string/format' ); +var pkg = require( './../package.json' ).name; + + +// VARIABLES // + +var mean = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( mean instanceof Error ) +}; + + +// MAIN // + +bench( format( '%s::native', pkg ), opts, function benchmark( b ) { + var sigma; + var opts; + var mu; + var y; + var i; + + opts = { + 'dtype': 'float64' + }; + mu = uniform( 100, -50.0, 50.0, opts ); + sigma = uniform( 100, EPS, 20.0, opts ); + + b.tic(); + for ( i = 0; i < b.iterations; i++ ) { + y = mean( mu[ i % mu.length ], sigma[ i % sigma.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/anglit/mean/benchmark/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/c/Makefile new file mode 100644 index 000000000000..979768abbcec --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := benchmark.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled benchmarks. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/c/benchmark.c b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/c/benchmark.c new file mode 100644 index 000000000000..79958ad45ed0 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/benchmark/c/benchmark.c @@ -0,0 +1,141 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +#include "stdlib/stats/base/dists/anglit/mean.h" +#include "stdlib/constants/float64/eps.h" +#include +#include +#include +#include +#include + +#define NAME "anglit-mean" +#define ITERATIONS 1000000 +#define REPEATS 3 + +/** +* Prints the TAP version. +*/ +static void print_version( void ) { + printf( "TAP version 13\n" ); +} + +/** +* Prints the TAP summary. +* +* @param total total number of tests +* @param passing total number of passing tests +*/ +static void print_summary( int total, int passing ) { + printf( "#\n" ); + printf( "1..%d\n", total ); // TAP plan + printf( "# total %d\n", total ); + printf( "# pass %d\n", passing ); + printf( "#\n" ); + printf( "# ok\n" ); +} + +/** +* Prints benchmarks results. +* +* @param elapsed elapsed time in seconds +*/ +static void print_results( double elapsed ) { + double rate = (double)ITERATIONS / elapsed; + printf( " ---\n" ); + printf( " iterations: %d\n", ITERATIONS ); + printf( " elapsed: %0.9f\n", elapsed ); + printf( " rate: %0.9f\n", rate ); + printf( " ...\n" ); +} + +/** +* Returns a clock time. +* +* @return clock time +*/ +static double tic( void ) { + struct timeval now; + gettimeofday( &now, NULL ); + return (double)now.tv_sec + (double)now.tv_usec/1.0e6; +} + +/** +* Generates a random number on the interval [min,max). +* +* @param min minimum value (inclusive) +* @param max maximum value (exclusive) +* @return random number +*/ +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +/** +* Runs a benchmark. +* +* @return elapsed time in seconds +*/ +static double benchmark( void ) { + double elapsed; + double mu[ 100 ]; + double s[ 100 ]; + double y; + double t; + int i; + + for ( i = 0; i < 100; i++ ) { + mu[ i ] = random_uniform( -50.0, 50.0 ); + s[ i ] = random_uniform( STDLIB_CONSTANT_FLOAT64_EPS, 20.0 ); + } + + t = tic(); + for ( i = 0; i < ITERATIONS; i++ ) { + y = stdlib_base_dists_anglit_mean( mu[ i%100 ], s[ i%100 ] ); + if ( y != y ) { + printf( "should not return NaN\n" ); + break; + } + } + elapsed = tic() - t; + if ( y != y ) { + printf( "should not return NaN\n" ); + } + return elapsed; +} + +/** +* Main execution sequence. +*/ +int main( void ) { + double elapsed; + int i; + + // Use the current time to seed the random number generator: + srand( time( NULL ) ); + + print_version(); + for ( i = 0; i < REPEATS; i++ ) { + printf( "# c::%s\n", NAME ); + elapsed = benchmark(); + print_results( elapsed ); + printf( "ok %d benchmark finished\n", i+1 ); + } + print_summary( REPEATS, REPEATS ); +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/binding.gyp b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/binding.gyp new file mode 100644 index 000000000000..0d6508a12e99 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/binding.gyp @@ -0,0 +1,170 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 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. + +# A `.gyp` file for building a Node.js native add-on. +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # List of files to include in this file: + 'includes': [ + './include.gypi', + ], + + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Target name should match the add-on export name: + 'addon_target_name%': 'addon', + + # Set variables based on the host OS: + 'conditions': [ + [ + 'OS=="win"', + { + # Define the object file suffix: + 'obj': 'obj', + }, + { + # Define the object file suffix: + 'obj': 'o', + } + ], # end condition (OS=="win") + ], # end conditions + }, # end variables + + # Define compile targets: + 'targets': [ + + # Target to generate an add-on: + { + # The target name should match the add-on export name: + 'target_name': '<(addon_target_name)', + + # Define dependencies: + 'dependencies': [], + + # Define directories which contain relevant include headers: + 'include_dirs': [ + # Local include directory: + '<@(include_dirs)', + ], + + # List of source files: + 'sources': [ + '<@(src_files)', + ], + + # Settings which should be applied when a target's object files are used as linker input: + 'link_settings': { + # Define libraries: + 'libraries': [ + '<@(libraries)', + ], + + # Define library directories: + 'library_dirs': [ + '<@(library_dirs)', + ], + }, + + # C/C++ compiler flags: + 'cflags': [ + # Enable commonly used warning options: + '-Wall', + + # Aggressive optimization: + '-O3', + ], + + # C specific compiler flags: + 'cflags_c': [ + # Specify the C standard to which a program is expected to conform: + '-std=c99', + ], + + # C++ specific compiler flags: + 'cflags_cpp': [ + # Specify the C++ standard to which a program is expected to conform: + '-std=c++11', + ], + + # Linker flags: + 'ldflags': [], + + # Apply conditions based on the host OS: + 'conditions': [ + [ + 'OS=="mac"', + { + # Linker flags: + 'ldflags': [ + '-undefined dynamic_lookup', + '-Wl,-no-pie', + '-Wl,-search_paths_first', + ], + }, + ], # end condition (OS=="mac") + [ + 'OS!="win"', + { + # C/C++ flags: + 'cflags': [ + # Generate platform-independent code: + '-fPIC', + ], + }, + ], # end condition (OS!="win") + ], # end conditions + }, # end target <(addon_target_name) + + # Target to copy a generated add-on to a standard location: + { + 'target_name': 'copy_addon', + + # Declare that the output of this target is not linked: + 'type': 'none', + + # Define dependencies: + 'dependencies': [ + # Require that the add-on be generated before building this target: + '<(addon_target_name)', + ], + + # Define a list of actions: + 'actions': [ + { + 'action_name': 'copy_addon', + 'message': 'Copying addon...', + + # Explicitly list the inputs in the command-line invocation below: + 'inputs': [], + + # Declare the expected outputs: + 'outputs': [ + '<(addon_output_dir)/<(addon_target_name).node', + ], + + # Define the command-line invocation: + 'action': [ + 'cp', + '<(PRODUCT_DIR)/<(addon_target_name).node', + '<(addon_output_dir)/<(addon_target_name).node', + ], + }, + ], # end actions + }, # end target copy_addon + ], # end targets +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/repl.txt new file mode 100644 index 000000000000..f311c0f0f776 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/repl.txt @@ -0,0 +1,37 @@ + +{{alias}}( μ, sigma ) + Returns the expected value of an Anglit distribution with location + parameter `μ` and scale parameter `sigma`. + + If provided `NaN` as any argument, the function returns `NaN`. + + If provided `sigma <= 0`, the function returns `NaN`. + + Parameters + ---------- + μ: number + Location parameter. + + sigma: number + Scale parameter. + + Returns + ------- + out: number + Expected value. + + Examples + -------- + > var y = {{alias}}( 0.0, 1.0 ) + 0.0 + > y = {{alias}}( 4.0, 2.0 ) + 4.0 + > y = {{alias}}( NaN, 1.0 ) + NaN + > y = {{alias}}( 0.0, NaN ) + NaN + > y = {{alias}}( 0.0, 0.0 ) + NaN + + See Also + -------- diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/types/index.d.ts b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/types/index.d.ts new file mode 100644 index 000000000000..67c9405b39d5 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/types/index.d.ts @@ -0,0 +1,57 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 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 expected value for an Anglit distribution with location `mu` and scale `sigma`. +* +* ## Notes +* +* - If provided `sigma <= 0`, the function returns `NaN`. +* +* @param mu - location parameter +* @param sigma - scale parameter +* @returns expected value +* +* @example +* var y = mean( 0.0, 1.0 ); +* // returns 0.0 +* +* @example +* var y = mean( 5.0, 2.0 ); +* // returns 5.0 +* +* @example +* var y = mean( NaN, 1.0 ); +* // returns NaN +* +* @example +* var y = mean( 0.0, NaN ); +* // returns NaN +* +* @example +* var y = mean( 0.0, 0.0 ); +* // returns NaN +*/ +declare function mean( mu: number, sigma: number ): number; + + +// EXPORTS // + +export = mean; diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/types/test.ts b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/types/test.ts new file mode 100644 index 000000000000..7b9b8e3f7e1c --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/types/test.ts @@ -0,0 +1,56 @@ +/* +* @license Apache-2.0 +* +* Copyright (c) 2026 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 mean = require( './index' ); + + +// TESTS // + +// The function returns a number... +{ + mean( 0, 2 ); // $ExpectType number +} + +// The compiler throws an error if the function is provided values other than two numbers... +{ + mean( true, 3 ); // $ExpectError + mean( false, 2 ); // $ExpectError + mean( '5', 1 ); // $ExpectError + mean( [], 1 ); // $ExpectError + mean( {}, 2 ); // $ExpectError + mean( ( x: number ): number => x, 2 ); // $ExpectError + + mean( 9, true ); // $ExpectError + mean( 9, false ); // $ExpectError + mean( 5, '5' ); // $ExpectError + mean( 8, [] ); // $ExpectError + mean( 9, {} ); // $ExpectError + mean( 8, ( x: number ): number => x ); // $ExpectError + + mean( [], true ); // $ExpectError + mean( {}, false ); // $ExpectError + mean( false, '5' ); // $ExpectError + mean( {}, [] ); // $ExpectError + mean( '5', ( x: number ): number => x ); // $ExpectError +} + +// The compiler throws an error if the function is provided insufficient arguments... +{ + mean(); // $ExpectError + mean( 3 ); // $ExpectError +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/c/Makefile b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/c/Makefile new file mode 100644 index 000000000000..c8f8e9a1517b --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/c/Makefile @@ -0,0 +1,146 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + +# Define the program used for compiling C source files: +ifdef C_COMPILER + CC := $(C_COMPILER) +else + CC := gcc +endif + +# Define the command-line options when compiling C files: +CFLAGS ?= \ + -std=c99 \ + -O3 \ + -Wall \ + -pedantic + +# Determine whether to generate position independent code ([1][1], [2][2]). +# +# [1]: https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#Code-Gen-Options +# [2]: http://stackoverflow.com/questions/5311515/gcc-fpic-option +ifeq ($(OS), WINNT) + fPIC ?= +else + fPIC ?= -fPIC +endif + +# List of includes (e.g., `-I /foo/bar -I /beep/boop/include`): +INCLUDE ?= + +# List of source files: +SOURCE_FILES ?= + +# List of libraries (e.g., `-lopenblas -lpthread`): +LIBRARIES ?= + +# List of library paths (e.g., `-L /foo/bar -L /beep/boop`): +LIBPATH ?= + +# List of C targets: +c_targets := example.out + + +# RULES # + +#/ +# Compiles source files. +# +# @param {string} [C_COMPILER] - C compiler (e.g., `gcc`) +# @param {string} [CFLAGS] - C compiler options +# @param {(string|void)} [fPIC] - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} [INCLUDE] - list of includes (e.g., `-I /foo/bar -I /beep/boop/include`) +# @param {string} [SOURCE_FILES] - list of source files +# @param {string} [LIBPATH] - list of library paths (e.g., `-L /foo/bar -L /beep/boop`) +# @param {string} [LIBRARIES] - list of libraries (e.g., `-lopenblas -lpthread`) +# +# @example +# make +# +# @example +# make all +#/ +all: $(c_targets) + +.PHONY: all + +#/ +# Compiles C source files. +# +# @private +# @param {string} CC - C compiler (e.g., `gcc`) +# @param {string} CFLAGS - C compiler options +# @param {(string|void)} fPIC - compiler flag determining whether to generate position independent code (e.g., `-fPIC`) +# @param {string} INCLUDE - list of includes (e.g., `-I /foo/bar`) +# @param {string} SOURCE_FILES - list of source files +# @param {string} LIBPATH - list of library paths (e.g., `-L /foo/bar`) +# @param {string} LIBRARIES - list of libraries (e.g., `-lopenblas`) +#/ +$(c_targets): %.out: %.c + $(QUIET) $(CC) $(CFLAGS) $(fPIC) $(INCLUDE) -o $@ $(SOURCE_FILES) $< $(LIBPATH) -lm $(LIBRARIES) + +#/ +# Runs compiled examples. +# +# @example +# make run +#/ +run: $(c_targets) + $(QUIET) ./$< + +.PHONY: run + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: + $(QUIET) -rm -f *.o *.out + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/c/example.c b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/c/example.c new file mode 100644 index 000000000000..688c6f6552f7 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/c/example.c @@ -0,0 +1,40 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +#include "stdlib/stats/base/dists/anglit/mean.h" +#include +#include + +static double random_uniform( const double min, const double max ) { + double v = (double)rand() / ( (double)RAND_MAX + 1.0 ); + return min + ( v*(max-min) ); +} + +int main( void ) { + double mu; + double sigma; + double y; + int i; + + for ( i = 0; i < 10; i++ ) { + mu = random_uniform( -5.0, 5.0 ); + sigma = random_uniform( 0.1, 20.0 ); + y = stdlib_base_dists_anglit_mean( mu, sigma ); + printf( "µ: %lf, sigma: %lf, E(X;µ,sigma): %lf\n", mu, sigma, y ); + } +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/index.js b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/index.js new file mode 100644 index 000000000000..01f091af7e5f --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/examples/index.js @@ -0,0 +1,31 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 logEachMap = require( '@stdlib/console/log-each-map' ); +var mean = require( './../lib' ); + +var opts = { + 'dtype': 'float64' +}; +var mu = uniform( 10, -5.0, 5.0, opts ); +var sigma = uniform( 10, 0.1, 20.0, opts ); + +logEachMap( 'µ: %lf, sigma: %lf, E(X;µ,sigma): %lf', mu, sigma, mean ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/include.gypi b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/include.gypi new file mode 100644 index 000000000000..bee8d41a2caf --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/include.gypi @@ -0,0 +1,53 @@ +# @license Apache-2.0 +# +# Copyright (c) 2026 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. + +# A GYP include file for building a Node.js native add-on. +# +# Main documentation: +# +# [1]: https://gyp.gsrc.io/docs/InputFormatReference.md +# [2]: https://gyp.gsrc.io/docs/UserDocumentation.md +{ + # Define variables to be used throughout the configuration for all targets: + 'variables': { + # Source directory: + 'src_dir': './src', + + # Include directories: + 'include_dirs': [ + '=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdmath", + "statistics", + "stats", + "distribution", + "dist", + "moments", + "continuous", + "mean", + "average", + "avg", + "expected", + "anglit", + "univariate" + ] +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/Makefile b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/Makefile new file mode 100644 index 000000000000..2caf905cedbe --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/Makefile @@ -0,0 +1,70 @@ +#/ +# @license Apache-2.0 +# +# Copyright (c) 2026 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. +#/ + +# VARIABLES # + +ifndef VERBOSE + QUIET := @ +else + QUIET := +endif + +# Determine the OS ([1][1], [2][2]). +# +# [1]: https://en.wikipedia.org/wiki/Uname#Examples +# [2]: http://stackoverflow.com/a/27776822/2225624 +OS ?= $(shell uname) +ifneq (, $(findstring MINGW,$(OS))) + OS := WINNT +else +ifneq (, $(findstring MSYS,$(OS))) + OS := WINNT +else +ifneq (, $(findstring CYGWIN,$(OS))) + OS := WINNT +else +ifneq (, $(findstring Windows_NT,$(OS))) + OS := WINNT +endif +endif +endif +endif + + +# RULES # + +#/ +# Removes generated files for building an add-on. +# +# @example +# make clean-addon +#/ +clean-addon: + $(QUIET) -rm -f *.o *.node + +.PHONY: clean-addon + +#/ +# Removes generated files. +# +# @example +# make clean +#/ +clean: clean-addon + +.PHONY: clean diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/addon.c b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/addon.c new file mode 100644 index 000000000000..0da23b2b0838 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/addon.c @@ -0,0 +1,22 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +#include "stdlib/stats/base/dists/anglit/mean.h" +#include "stdlib/math/base/napi/binary.h" + +STDLIB_MATH_BASE_NAPI_MODULE_DD_D( stdlib_base_dists_anglit_mean ) diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/main.c new file mode 100644 index 000000000000..bf712d956748 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/main.c @@ -0,0 +1,42 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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. +*/ + +#include "stdlib/stats/base/dists/anglit/mean.h" +#include "stdlib/math/base/assert/is_nan.h" + +/** +* Returns the expected value for an Anglit distribution with location `mu` and scale `sigma`. +* +* @param mu location parameter +* @param sigma scale parameter +* @return expected value +* +* @example +* double y = stdlib_base_dists_anglit_mean( 0.0, 1.0 ); +* // returns 0.0 +*/ +double stdlib_base_dists_anglit_mean( const double mu, const double sigma ) { + if ( + stdlib_base_is_nan( mu ) || + stdlib_base_is_nan( sigma ) || + sigma <= 0.0 + ) { + return 0.0/0.0; // NaN + } + return mu; +} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/data.json b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/data.json new file mode 100644 index 000000000000..170d1d57a66e --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/data.json @@ -0,0 +1 @@ +{"mu": [-2.140767814365704, -3.367248890836428, -3.632162376645811, -3.590879442893921, -2.8645499418366267, -2.808910594041497, -2.070970960528757, -2.6936458062568582, -2.5021867249321765, -2.6928602582965295, -2.5045703814574525, -2.0773865278543573, -3.983223404116893, -3.787111246604561, -3.402592572461237, -2.68717763383546, -2.3803748949181305, -2.255648172551434, -2.0707048052561396, -2.5526293061600933, -2.7150493442083175, -2.5650927583751724, -3.064801985561407, -3.3488306449212444, -3.1207107882303813, -2.540621834506297, -2.0119708282000763, -2.64625257645246, -2.418354964304423, -3.6581714844151314, -3.9463014484201286, -2.3992595121490785, -2.192554923566, -3.9506475791414695, -3.0165053631082284, -2.9474896653002842, -2.8072679791612387, -3.896084909794933, -2.209820943892158, -2.5434676393457654, -2.363299977220171, -2.9995544943311034, -2.3796211823934907, -3.808062948510867, -3.562099912535813, -3.482561876793775, -3.0637884920941296, -3.081253594793038, -2.580980439581642, -3.6438939882329238, -2.937100231280732, -3.6645155424270284, -2.4623721631883795, -2.1436589017693546, -2.781012684012993, -3.699633010662237, -3.020746592612009, -3.2453100923335487, -2.302797176044442, -2.177805542736655, -3.232302557685423, -3.369008193207752, -2.863211694409152, -3.6243639299512003, -3.7483169123452598, -2.624808389911016, -2.4007865641051964, -2.8529268696027135, -2.05354003680103, -2.731891245725043, -2.2231565503771464, -3.0091704824850716, -3.296766940219576, -2.571539262910959, -2.992141767104169, -3.5487247869587213, -3.510051119516272, -2.414398599900819, -3.009655170977262, -2.169812653200447, -2.1092563322499647, -2.9335355406895687, -3.495014810885147, -2.558275883650304, -3.2651224724108454, -3.0027031141778933, -3.5468499050750886, -3.292868706507906, -2.698296426753589, -3.374134209389696, -2.4625291056613205, -2.4363257932574918, -2.29518103411855, -2.1001885196960255, -3.7853541755979117, -2.1785492880691946, -3.327889676175028, -2.347239146370711, -2.2037987297603063, -3.914569391327334], "sigma": [0.9789749954439819, 1.4725066097855222, 3.134999402859645, 0.43111552561376054, 0.7147250990610482, 2.5791325961546585, 3.4467066482914905, 4.283129053949444, 3.2368084166105553, 2.9080933776536995, 3.5555797754922986, 1.2620842852326242, 4.500798417413038, 2.2114684645314195, 0.10260412328356006, 4.798305069984079, 3.2611271122386274, 2.5660312505233684, 3.41178191568852, 2.4477019531458555, 4.632450856287161, 2.579398860843252, 0.3607994086846561, 2.837541490995318, 3.0762159186187215, 4.7077314723482, 2.0768167736050147, 1.322199872877417, 0.4869658268288929, 2.4292211093900082, 2.323314314304765, 0.14879658495571102, 3.4713873092868774, 3.58473556182613, 3.649057116455847, 2.0717550859477285, 0.07549422397079508, 4.544875787420736, 3.9468935905517997, 0.8259958458158828, 1.563929806631355, 3.05472652909798, 1.8224514335942954, 0.7801929460074974, 0.8865190671227591, 4.3394483552352305, 1.4504733422224674, 2.9258981065733067, 2.269974379547345, 2.055890660862694, 4.4131722258842085, 3.463540073973745, 1.3963667759787524, 0.3222011559264176, 0.9931180687942448, 4.658413723514779, 4.272067838903452, 4.773673672804626, 0.2612667412158648, 2.89735840295467, 2.402481333245647, 0.10854489487782115, 1.8681023186719747, 2.070459005882796, 3.0195361695700216, 3.3587436367761874, 4.194328502191582, 3.89763104159437, 2.003505220206156, 3.9726461569484153, 4.465621551988015, 1.3124484542944574, 4.945985036890529, 4.266535495078689, 3.657385780188785, 1.777828123531768, 4.416447453536683, 4.339795454135427, 4.77883222916819, 0.0005362825986848785, 0.08270520959487326, 1.5703502862937202, 4.976580872963579, 0.7442211157799528, 0.8368855935425218, 3.7928601845895966, 0.3476483307716155, 3.5273671929813526, 2.3458264088954777, 0.05094108062656422, 3.87411931433131, 3.9710050418023704, 0.7478472587293278, 0.11851815895044471, 3.8103188544719497, 1.118350899466722, 1.3108719888255709, 2.2843475138774743, 1.2496345925350911, 2.841417807953734], "expected": [-2.140767814365704, -3.367248890836428, -3.632162376645811, -3.590879442893921, -2.8645499418366267, -2.808910594041497, -2.070970960528757, -2.6936458062568582, -2.5021867249321765, -2.6928602582965295, -2.5045703814574525, -2.0773865278543573, -3.983223404116893, -3.787111246604561, -3.402592572461237, -2.68717763383546, -2.3803748949181305, -2.255648172551434, -2.0707048052561396, -2.5526293061600933, -2.7150493442083175, -2.5650927583751724, -3.064801985561407, -3.3488306449212444, -3.1207107882303813, -2.540621834506297, -2.0119708282000763, -2.64625257645246, -2.418354964304423, -3.6581714844151314, -3.9463014484201286, -2.3992595121490785, -2.192554923566, -3.9506475791414695, -3.0165053631082284, -2.9474896653002842, -2.8072679791612387, -3.896084909794933, -2.209820943892158, -2.5434676393457654, -2.363299977220171, -2.9995544943311034, -2.3796211823934907, -3.808062948510867, -3.562099912535813, -3.482561876793775, -3.0637884920941296, -3.081253594793038, -2.580980439581642, -3.6438939882329238, -2.937100231280732, -3.6645155424270284, -2.4623721631883795, -2.1436589017693546, -2.781012684012993, -3.699633010662237, -3.020746592612009, -3.2453100923335487, -2.302797176044442, -2.177805542736655, -3.232302557685423, -3.369008193207752, -2.863211694409152, -3.6243639299512003, -3.7483169123452598, -2.624808389911016, -2.4007865641051964, -2.8529268696027135, -2.05354003680103, -2.731891245725043, -2.2231565503771464, -3.0091704824850716, -3.296766940219576, -2.571539262910959, -2.992141767104169, -3.5487247869587213, -3.510051119516272, -2.414398599900819, -3.009655170977262, -2.169812653200447, -2.1092563322499647, -2.9335355406895687, -3.495014810885147, -2.558275883650304, -3.2651224724108454, -3.0027031141778933, -3.5468499050750886, -3.292868706507906, -2.698296426753589, -3.374134209389696, -2.4625291056613205, -2.4363257932574918, -2.29518103411855, -2.1001885196960255, -3.7853541755979117, -2.1785492880691946, -3.327889676175028, -2.347239146370711, -2.2037987297603063, -3.914569391327334]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/large_mu.json b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/large_mu.json new file mode 100644 index 000000000000..a1959eacbf77 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/large_mu.json @@ -0,0 +1 @@ +{"mu": [-1000000.0, -979797.9797979798, -959595.9595959596, -939393.9393939395, -919191.9191919192, -898989.898989899, -878787.8787878788, -858585.8585858586, -838383.8383838384, -818181.8181818181, -797979.7979797979, -777777.7777777778, -757575.7575757576, -737373.7373737374, -717171.7171717172, -696969.696969697, -676767.6767676768, -656565.6565656567, -636363.6363636364, -616161.6161616162, -595959.595959596, -575757.5757575757, -555555.5555555555, -535353.5353535353, -515151.51515151514, -494949.49494949495, -474747.4747474748, -454545.4545454546, -434343.4343434344, -414141.4141414141, -393939.3939393939, -373737.37373737374, -353535.35353535356, -333333.3333333334, -313131.3131313132, -292929.292929293, -272727.2727272727, -252525.25252525252, -232323.23232323234, -212121.21212121216, -191919.19191919197, -171717.1717171718, -151515.1515151515, -131313.1313131313, -111111.11111111112, -90909.09090909094, -70707.07070707076, -50505.050505050574, -30303.030303030275, -10101.010101010092, 10101.010101010092, 30303.030303030275, 50505.05050505046, 70707.07070707064, 90909.09090909082, 111111.11111111101, 131313.1313131312, 151515.15151515137, 171717.1717171718, 191919.19191919197, 212121.21212121216, 232323.23232323234, 252525.25252525252, 272727.2727272727, 292929.2929292929, 313131.3131313131, 333333.33333333326, 353535.35353535344, 373737.3737373736, 393939.3939393938, 414141.414141414, 434343.4343434344, 454545.4545454546, 474747.4747474748, 494949.49494949495, 515151.51515151514, 535353.5353535353, 555555.5555555555, 575757.5757575757, 595959.5959595959, 616161.616161616, 636363.6363636362, 656565.6565656564, 676767.6767676766, 696969.696969697, 717171.7171717172, 737373.7373737374, 757575.7575757576, 777777.7777777778, 797979.7979797979, 818181.8181818181, 838383.8383838383, 858585.8585858585, 878787.8787878787, 898989.8989898989, 919191.919191919, 939393.9393939395, 959595.9595959596, 979797.9797979798, 1000000.0], "sigma": [1.5804400738180586, 4.092575296079637, 1.5738914646866835, 3.585607966667637, 1.4647961437546324, 4.662642256327037, 1.5926961687995067, 4.549298860518348, 4.833611468823618, 0.9445641143554966, 1.8964570286631732, 3.510886514356168, 4.7069598502752115, 0.8246217199714211, 0.5993719247909028, 2.158013882858265, 4.975626853789965, 0.3075327044934244, 1.034571472562451, 3.1438399399802406, 0.5360935756157147, 1.681440769559766, 3.1506788825353937, 1.1059735644906517, 3.55948858213899, 1.3231348559617906, 3.5018584794756964, 2.5296886445493856, 1.4024740583524842, 1.5137015960833948, 4.62725809913594, 1.4792134371923131, 4.305740212538851, 1.0821218734284654, 1.752917147322301, 4.833149425916398, 2.630359247693616, 2.1170792914771535, 0.23530769188430437, 3.2088684471667555, 1.8367425337866443, 1.4839961390229899, 0.4202738696644963, 1.771952594578405, 0.4385497123249642, 0.1191212413148928, 0.30483901707242844, 1.8447743281148021, 0.5597715541820502, 2.70157863229424, 1.1787490669110006, 5.058332725529616, 1.4359358052572442, 3.5008402627066117, 2.731230595841607, 2.2996153486523316, 3.407776228630686, 0.7739258730182795, 4.03924502454526, 0.7898885050619208, 3.264616488647564, 1.168326788502675, 0.2168765736661276, 3.2346698664048783, 3.3108186328510136, 3.3105166839110605, 4.423104498371078, 1.7860070173321834, 2.154791933740559, 3.151593418875399, 4.8042159536937055, 0.8603863489627455, 1.020290030049087, 0.8721914409800029, 3.6641216292491112, 4.739915806731243, 2.2134358999083643, 2.8258863182451615, 1.7119448266096704, 0.9035234161725157, 3.6157601229577336, 3.751242032085028, 4.90202268804457, 1.9524528538344155, 3.683491959091498, 5.030306089122703, 0.6538377933819371, 3.8911427445448847, 0.8877706066768108, 4.182176277041699, 2.870532731137267, 3.0085511042970636, 4.780727916004144, 2.2717387755077927, 2.5456359318402906, 3.430652334028832, 3.250770005410206, 0.7510237532657836, 1.869219856161184, 3.2756169231806194], "expected": [-1000000.0, -979797.9797979798, -959595.9595959596, -939393.9393939395, -919191.9191919192, -898989.898989899, -878787.8787878788, -858585.8585858586, -838383.8383838384, -818181.8181818181, -797979.7979797979, -777777.7777777778, -757575.7575757576, -737373.7373737374, -717171.7171717172, -696969.696969697, -676767.6767676768, -656565.6565656567, -636363.6363636364, -616161.6161616162, -595959.595959596, -575757.5757575757, -555555.5555555555, -535353.5353535353, -515151.51515151514, -494949.49494949495, -474747.4747474748, -454545.4545454546, -434343.4343434344, -414141.4141414141, -393939.3939393939, -373737.37373737374, -353535.35353535356, -333333.3333333334, -313131.3131313132, -292929.292929293, -272727.2727272727, -252525.25252525252, -232323.23232323234, -212121.21212121216, -191919.19191919197, -171717.1717171718, -151515.1515151515, -131313.1313131313, -111111.11111111112, -90909.09090909094, -70707.07070707076, -50505.050505050574, -30303.030303030275, -10101.010101010092, 10101.010101010092, 30303.030303030275, 50505.05050505046, 70707.07070707064, 90909.09090909082, 111111.11111111101, 131313.1313131312, 151515.15151515137, 171717.1717171718, 191919.19191919197, 212121.21212121216, 232323.23232323234, 252525.25252525252, 272727.2727272727, 292929.2929292929, 313131.3131313131, 333333.33333333326, 353535.35353535344, 373737.3737373736, 393939.3939393938, 414141.414141414, 434343.4343434344, 454545.4545454546, 474747.4747474748, 494949.49494949495, 515151.51515151514, 535353.5353535353, 555555.5555555555, 575757.5757575757, 595959.5959595959, 616161.616161616, 636363.6363636362, 656565.6565656564, 676767.6767676766, 696969.696969697, 717171.7171717172, 737373.7373737374, 757575.7575757576, 777777.7777777778, 797979.7979797979, 818181.8181818181, 838383.8383838383, 858585.8585858585, 878787.8787878787, 898989.8989898989, 919191.919191919, 939393.9393939395, 959595.9595959596, 979797.9797979798, 1000000.0]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/large_sigma.json b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/large_sigma.json new file mode 100644 index 000000000000..1e9888e23fd9 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/large_sigma.json @@ -0,0 +1 @@ +{"mu": [-3.5417886878288263, -3.627887154368624, -2.9815771559799034, -2.9390046346721777, -3.4347215166494736, -3.3796769292831983, -3.3802312477402046, -3.467222228203418, -2.8131376982561145, -3.565731255082145, -3.1952341646438844, -3.422877521002298, -3.6523183695475314, -3.548572953422959, -2.022717164841003, -3.1318972942179846, -2.343621447958088, -2.8549743361132083, -2.6961994430191716, -2.5405236877466484, -3.217432697757953, -3.2142750868658507, -2.2808975392740263, -2.3799607775919576, -2.326912231236138, -3.6240241514750835, -3.2808065051577344, -3.036032033861823, -2.0678547077845053, -2.87337363218741, -2.344990274804045, -3.8477847801326934, -2.8937241108729133, -2.9041190804875603, -2.189112804178878, -3.261022650774289, -2.1976747161168184, -3.71873795013435, -3.801652549381977, -2.0536334799198155, -2.11590995931003, -2.818106079520968, -3.8960842710173376, -3.8996966045727226, -3.3507956458604524, -3.2485004762747067, -2.471701361197338, -2.28146831305369, -2.9085834516563596, -3.352290033665148, -3.1883702654822033, -3.7806644536692113, -3.72541736602008, -2.509222062245282, -2.247168918910088, -3.4820213131712596, -2.6287966781522156, -3.2817770489591034, -3.9879657490844735, -2.47763828563623, -3.171955213154498, -3.3322160514284564, -3.443913833845761, -2.8149716822658393, -3.3497987155411977, -2.1263893179856055, -3.8080340491281386, -2.2334085082235404, -2.8639645341972284, -3.8761530509250584, -2.2500226696029264, -3.5502944656501487, -2.4012334372222695, -2.396250034176015, -3.9420909606905696, -2.7458019930473254, -2.790721478390293, -3.843584950289623, -2.454092874588663, -3.7133667514607476, -3.0726307843426666, -3.805778648080278, -2.8602915681546652, -3.192466083559398, -2.826842590547285, -2.5025872508808193, -2.22077233393696, -3.2412196891492555, -3.4151274764253308, -2.9814195200528517, -2.9343727992022277, -3.789156758616528, -3.9081179930860275, -2.756013701617964, -2.355110155476472, -3.8898728601894934, -2.4040531093997, -3.5115101564266444, -2.392924515981108, -3.4036498690752994], "sigma": [1000.0, 11090.90909090909, 21181.81818181818, 31272.727272727272, 41363.63636363636, 51454.54545454545, 61545.454545454544, 71636.36363636363, 81727.27272727272, 91818.18181818181, 101909.0909090909, 111999.99999999999, 122090.90909090909, 132181.81818181818, 142272.72727272726, 152363.63636363635, 162454.54545454544, 172545.45454545453, 182636.36363636362, 192727.2727272727, 202818.1818181818, 212909.09090909088, 222999.99999999997, 233090.90909090906, 243181.81818181818, 253272.72727272726, 263363.63636363635, 273454.5454545454, 283545.45454545453, 293636.3636363636, 303727.2727272727, 313818.18181818177, 323909.0909090909, 334000.0, 344090.90909090906, 354181.8181818182, 364272.72727272724, 374363.63636363635, 384454.5454545454, 394545.45454545453, 404636.3636363636, 414727.2727272727, 424818.18181818177, 434909.0909090909, 444999.99999999994, 455090.90909090906, 465181.8181818181, 475272.72727272724, 485363.63636363635, 495454.5454545454, 505545.45454545453, 515636.3636363636, 525727.2727272727, 535818.1818181818, 545909.0909090908, 556000.0, 566090.9090909091, 576181.8181818181, 586272.7272727272, 596363.6363636364, 606454.5454545454, 616545.4545454545, 626636.3636363635, 636727.2727272727, 646818.1818181818, 656909.0909090908, 667000.0, 677090.9090909091, 687181.8181818181, 697272.7272727272, 707363.6363636364, 717454.5454545454, 727545.4545454545, 737636.3636363635, 747727.2727272727, 757818.1818181818, 767909.0909090908, 777999.9999999999, 788090.9090909091, 798181.8181818181, 808272.7272727272, 818363.6363636364, 828454.5454545454, 838545.4545454545, 848636.3636363635, 858727.2727272727, 868818.1818181818, 878909.0909090908, 888999.9999999999, 899090.9090909091, 909181.8181818181, 919272.7272727272, 929363.6363636362, 939454.5454545454, 949545.4545454545, 959636.3636363635, 969727.2727272727, 979818.1818181818, 989909.0909090908, 1000000.0], "expected": [-3.5417886878288263, -3.627887154368624, -2.9815771559799034, -2.9390046346721777, -3.4347215166494736, -3.3796769292831983, -3.3802312477402046, -3.467222228203418, -2.8131376982561145, -3.565731255082145, -3.1952341646438844, -3.422877521002298, -3.6523183695475314, -3.548572953422959, -2.022717164841003, -3.1318972942179846, -2.343621447958088, -2.8549743361132083, -2.6961994430191716, -2.5405236877466484, -3.217432697757953, -3.2142750868658507, -2.2808975392740263, -2.3799607775919576, -2.326912231236138, -3.6240241514750835, -3.2808065051577344, -3.036032033861823, -2.0678547077845053, -2.87337363218741, -2.344990274804045, -3.8477847801326934, -2.8937241108729133, -2.9041190804875603, -2.189112804178878, -3.261022650774289, -2.1976747161168184, -3.71873795013435, -3.801652549381977, -2.0536334799198155, -2.11590995931003, -2.818106079520968, -3.8960842710173376, -3.8996966045727226, -3.3507956458604524, -3.2485004762747067, -2.471701361197338, -2.28146831305369, -2.9085834516563596, -3.352290033665148, -3.1883702654822033, -3.7806644536692113, -3.72541736602008, -2.509222062245282, -2.247168918910088, -3.4820213131712596, -2.6287966781522156, -3.2817770489591034, -3.9879657490844735, -2.47763828563623, -3.171955213154498, -3.3322160514284564, -3.443913833845761, -2.8149716822658393, -3.3497987155411977, -2.1263893179856055, -3.8080340491281386, -2.2334085082235404, -2.8639645341972284, -3.8761530509250584, -2.2500226696029264, -3.5502944656501487, -2.4012334372222695, -2.396250034176015, -3.9420909606905696, -2.7458019930473254, -2.790721478390293, -3.843584950289623, -2.454092874588663, -3.7133667514607476, -3.0726307843426666, -3.805778648080278, -2.8602915681546652, -3.192466083559398, -2.826842590547285, -2.5025872508808193, -2.22077233393696, -3.2412196891492555, -3.4151274764253308, -2.9814195200528517, -2.9343727992022277, -3.789156758616528, -3.9081179930860275, -2.756013701617964, -2.355110155476472, -3.8898728601894934, -2.4040531093997, -3.5115101564266444, -2.392924515981108, -3.4036498690752994]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/runner.py b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/runner.py new file mode 100644 index 000000000000..d1b074b041f5 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/runner.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python +# +# @license Apache-2.0 +# +# Copyright (c) 2026 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 +from scipy.stats import anglit + + +# Get the file path: +FILE = os.path.realpath(__file__) + +# Extract the directory in which this file resides: +DIR = os.path.dirname(FILE) + + +def gen(location, scale, name): + """ + Generate fixture data and write to file. + + # Arguments + + * `location`: location parameters. + * `scale`: scale parameters. + * `name::str`: output filename. + + # Examples + + ```python + python> location = np.random.rand(1000) * 10.0 - 5.0 + python> scale = np.random.rand(1000) * 5.0 + python> gen(location, scale, "data.json") + ``` + """ + # Compute mean values: + expected = anglit.mean(loc=location, scale=scale) + + # Store data to be written to file as a dictionary: + data = { + "mu": location.tolist(), + "sigma": scale.tolist(), + "expected": np.asarray(expected).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.""" + np.random.seed(12345) + + # Random baseline coverage: + location = (np.random.rand(100) * 2.0) - 4.0 + scale = np.random.rand(100) * 5.0 + gen(location, scale, "data.json") + + # Small |mu| values: + location = np.linspace(-1.0e-6, 1.0e-6, 100) + scale = (np.random.rand(100) * 5.0) + 0.1 + gen(location, scale, "small_mu.json") + + # Large |mu| values: + location = np.linspace(-1.0e6, 1.0e6, 100) + scale = (np.random.rand(100) * 5.0) + 0.1 + gen(location, scale, "large_mu.json") + + # Small positive sigma values: + location = (np.random.rand(100) * 2.0) - 4.0 + scale = np.linspace(1.0e-12, 1.0e-6, 100) + gen(location, scale, "small_sigma.json") + + # Large sigma values: + location = (np.random.rand(100) * 2.0) - 4.0 + scale = np.linspace(1.0e3, 1.0e6, 100) + gen(location, scale, "large_sigma.json") + + +if __name__ == "__main__": + main() diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/small_mu.json b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/small_mu.json new file mode 100644 index 000000000000..930a941ceef3 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/small_mu.json @@ -0,0 +1 @@ +{"mu": [-1e-06, -9.797979797979797e-07, -9.595959595959596e-07, -9.393939393939393e-07, -9.191919191919192e-07, -8.98989898989899e-07, -8.787878787878787e-07, -8.585858585858586e-07, -8.383838383838384e-07, -8.181818181818181e-07, -7.97979797979798e-07, -7.777777777777778e-07, -7.575757575757575e-07, -7.373737373737373e-07, -7.171717171717172e-07, -6.969696969696969e-07, -6.767676767676767e-07, -6.565656565656566e-07, -6.363636363636363e-07, -6.161616161616161e-07, -5.95959595959596e-07, -5.757575757575757e-07, -5.555555555555555e-07, -5.353535353535354e-07, -5.151515151515151e-07, -4.949494949494949e-07, -4.7474747474747474e-07, -4.5454545454545457e-07, -4.343434343434343e-07, -4.1414141414141413e-07, -3.9393939393939396e-07, -3.737373737373737e-07, -3.535353535353535e-07, -3.3333333333333335e-07, -3.131313131313131e-07, -2.929292929292929e-07, -2.7272727272727274e-07, -2.5252525252525247e-07, -2.323232323232323e-07, -2.1212121212121213e-07, -1.9191919191919197e-07, -1.717171717171717e-07, -1.5151515151515152e-07, -1.3131313131313136e-07, -1.1111111111111108e-07, -9.090909090909091e-08, -7.070707070707075e-08, -5.050505050505047e-08, -3.03030303030302e-08, -1.0101010101010137e-08, 1.0101010101010137e-08, 3.03030303030302e-08, 5.050505050505047e-08, 7.070707070707075e-08, 9.090909090909081e-08, 1.1111111111111108e-07, 1.3131313131313136e-07, 1.5151515151515142e-07, 1.717171717171717e-07, 1.9191919191919197e-07, 2.1212121212121203e-07, 2.323232323232323e-07, 2.525252525252526e-07, 2.7272727272727264e-07, 2.929292929292929e-07, 3.131313131313132e-07, 3.3333333333333325e-07, 3.535353535353535e-07, 3.737373737373738e-07, 3.9393939393939386e-07, 4.1414141414141413e-07, 4.343434343434344e-07, 4.5454545454545447e-07, 4.7474747474747474e-07, 4.94949494949495e-07, 5.151515151515151e-07, 5.353535353535354e-07, 5.555555555555556e-07, 5.757575757575757e-07, 5.95959595959596e-07, 6.16161616161616e-07, 6.363636363636363e-07, 6.565656565656566e-07, 6.767676767676766e-07, 6.969696969696969e-07, 7.171717171717172e-07, 7.373737373737372e-07, 7.575757575757575e-07, 7.777777777777778e-07, 7.979797979797979e-07, 8.181818181818181e-07, 8.383838383838384e-07, 8.585858585858585e-07, 8.787878787878787e-07, 8.98989898989899e-07, 9.191919191919193e-07, 9.393939393939396e-07, 9.595959595959594e-07, 9.797979797979797e-07, 1e-06], "sigma": [4.334714984551218, 1.9904976851478529, 2.2623255821601833, 4.263095881370557, 1.9556596784709694, 0.302766359630811, 2.8733574298599347, 2.356231214054601, 3.726504883633656, 1.9922526115729782, 4.303312478544532, 2.4465734679181215, 2.9132171450608686, 3.405996696225295, 2.4112093376233568, 3.2181847274435826, 1.2094031559268004, 3.764315583775995, 2.0084104434799794, 1.0741727088528223, 1.4558138739698423, 1.3461252598140627, 0.8606953112773329, 3.9568685210066317, 1.3770586618198843, 0.7377170252426722, 3.4258357666134693, 2.164024743399914, 3.4388388321944197, 3.3990675854899655, 1.626888359387499, 1.1061212051437512, 1.2101356324956298, 0.6998543167196546, 0.2857272051513198, 0.2706579176205963, 1.252482739572779, 1.2417685323274879, 3.224553109624047, 4.562805927333805, 3.998640081214712, 3.7072563431403727, 1.6522107951762632, 1.9154170821158982, 1.0804089193214477, 4.777458990168405, 2.908670000880102, 4.186457684453554, 1.8445699047350284, 4.098571314118064, 0.6205223126367081, 3.660600825636974, 4.687242479578298, 4.117926843145993, 1.7355657314947892, 1.3755358963193292, 2.575010871785689, 2.1680547713473337, 2.224685476463761, 0.4718915242238446, 3.116953256447619, 3.8359986677273628, 4.0878811333041, 2.007502612768964, 4.085790764102047, 2.458986848070948, 3.7069958557231564, 1.046063446372512, 2.2729785468980506, 4.217340545260709, 4.231363139325514, 1.0476274174081412, 0.20051085076331568, 3.617456930279847, 1.8363505970946958, 2.197519081117268, 3.940444515888594, 4.914390331521435, 4.562826534627802, 0.7747113333701682, 4.089023574960359, 3.5104530377019816, 2.750264435605422, 4.429908276030835, 3.866240476763642, 0.5660129340962565, 1.7471971601578513, 2.16181347816428, 0.10482303883054203, 3.0878178156348257, 3.5128077104126794, 1.931403807717641, 2.0824942871348906, 2.476795727556564, 3.005399502716227, 0.7856856390538185, 5.097070867320243, 2.6366360439159546, 2.5653335227286993, 1.0343737751393922], "expected": [-1e-06, -9.797979797979797e-07, -9.595959595959596e-07, -9.393939393939393e-07, -9.191919191919192e-07, -8.98989898989899e-07, -8.787878787878787e-07, -8.585858585858586e-07, -8.383838383838384e-07, -8.181818181818181e-07, -7.97979797979798e-07, -7.777777777777778e-07, -7.575757575757575e-07, -7.373737373737373e-07, -7.171717171717172e-07, -6.969696969696969e-07, -6.767676767676767e-07, -6.565656565656566e-07, -6.363636363636363e-07, -6.161616161616161e-07, -5.95959595959596e-07, -5.757575757575757e-07, -5.555555555555555e-07, -5.353535353535354e-07, -5.151515151515151e-07, -4.949494949494949e-07, -4.7474747474747474e-07, -4.5454545454545457e-07, -4.343434343434343e-07, -4.1414141414141413e-07, -3.9393939393939396e-07, -3.737373737373737e-07, -3.535353535353535e-07, -3.3333333333333335e-07, -3.131313131313131e-07, -2.929292929292929e-07, -2.7272727272727274e-07, -2.5252525252525247e-07, -2.323232323232323e-07, -2.1212121212121213e-07, -1.9191919191919197e-07, -1.717171717171717e-07, -1.5151515151515152e-07, -1.3131313131313136e-07, -1.1111111111111108e-07, -9.090909090909091e-08, -7.070707070707075e-08, -5.050505050505047e-08, -3.03030303030302e-08, -1.0101010101010137e-08, 1.0101010101010137e-08, 3.03030303030302e-08, 5.050505050505047e-08, 7.070707070707075e-08, 9.090909090909081e-08, 1.1111111111111108e-07, 1.3131313131313136e-07, 1.5151515151515142e-07, 1.717171717171717e-07, 1.9191919191919197e-07, 2.1212121212121203e-07, 2.323232323232323e-07, 2.525252525252526e-07, 2.7272727272727264e-07, 2.929292929292929e-07, 3.131313131313132e-07, 3.3333333333333325e-07, 3.535353535353535e-07, 3.737373737373738e-07, 3.9393939393939386e-07, 4.1414141414141413e-07, 4.343434343434344e-07, 4.5454545454545447e-07, 4.7474747474747474e-07, 4.94949494949495e-07, 5.151515151515151e-07, 5.353535353535354e-07, 5.555555555555556e-07, 5.757575757575757e-07, 5.95959595959596e-07, 6.16161616161616e-07, 6.363636363636363e-07, 6.565656565656566e-07, 6.767676767676766e-07, 6.969696969696969e-07, 7.171717171717172e-07, 7.373737373737372e-07, 7.575757575757575e-07, 7.777777777777778e-07, 7.979797979797979e-07, 8.181818181818181e-07, 8.383838383838384e-07, 8.585858585858585e-07, 8.787878787878787e-07, 8.98989898989899e-07, 9.191919191919193e-07, 9.393939393939396e-07, 9.595959595959594e-07, 9.797979797979797e-07, 1e-06]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/small_sigma.json b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/small_sigma.json new file mode 100644 index 000000000000..771204b9f820 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/fixtures/python/small_sigma.json @@ -0,0 +1 @@ +{"mu": [-2.1620882779830826, -3.8174665588862142, -3.8578357500199383, -3.17257672772789, -3.5687176614273284, -2.960602736900583, -2.8829719557428306, -3.0525996721539386, -3.568255756681463, -3.521122229400776, -3.5665234945570177, -2.688619243731962, -2.307213099119549, -2.1390712133679974, -2.3993889657408776, -2.6385483095394857, -3.5854860836351574, -2.516680550052526, -2.6061908286083946, -3.23648105148322, -2.2997617507171517, -2.9437776377807445, -2.213981862024644, -2.3588812502094045, -3.542842761199417, -2.358752061497264, -3.7228771497267323, -3.035065009651624, -3.7023788871548087, -3.10341189013639, -2.6680870551922484, -2.4219351496343773, -2.6759584838155313, -2.5769751422798985, -2.2241526757377867, -3.7166494175056726, -3.704859752897275, -3.3481383141001375, -3.936252340902651, -2.6244742107673344, -2.470539909519716, -3.299981162650516, -2.767984778663786, -2.0830002823651146, -3.417894766773279, -2.6266430749918372, -3.915543539436084, -3.8749927365595065, -2.3712026085972715, -3.1267632751494476, -3.2158631359038115, -3.3387046406733907, -3.084682343168848, -2.3292956954508437, -3.066462247600996, -3.157428024455016, -2.8582968941229536, -2.5218880866133397, -3.889833182811852, -2.751638701856317, -2.7578793446115655, -3.9977789363616694, -2.7942129871967794, -3.919629175801977, -2.8284992664346333, -3.103241150673428, -3.2925394647621613, -2.1329495312515325, -3.465488136483318, -3.4374012390722877, -2.9901880727086922, -2.7063877626489665, -2.0588531419526768, -3.928249041210237, -3.1536002677138084, -2.823375822660002, -2.5365954348890334, -3.648977854164295, -2.97892243078136, -2.9994308083211862, -2.214464736044474, -3.2346345849888927, -2.6742723263940587, -3.906376880595899, -2.497553432236649, -3.262429415328469, -2.103942726876051, -3.305549563651568, -2.6322136023060847, -2.350730236509408, -3.027494011527616, -2.0316482573470154, -2.79237192367349, -2.480750336029599, -2.6309666092674964, -2.135167545635726, -2.1004290569429784, -2.0197777438940587, -3.7476892338259415, -2.0467987654961624], "sigma": [1e-12, 1.0101999999999998e-08, 2.0203e-08, 3.0304e-08, 4.0405e-08, 5.0505999999999996e-08, 6.0607e-08, 7.0708e-08, 8.080899999999999e-08, 9.090999999999998e-08, 1.0101099999999999e-07, 1.11112e-07, 1.21213e-07, 1.3131399999999998e-07, 1.41415e-07, 1.51516e-07, 1.6161699999999998e-07, 1.7171799999999998e-07, 1.8181899999999997e-07, 1.9192e-07, 2.0202099999999998e-07, 2.1212199999999997e-07, 2.22223e-07, 2.3232399999999998e-07, 2.4242499999999995e-07, 2.5252599999999994e-07, 2.6262699999999993e-07, 2.727279999999999e-07, 2.8282899999999997e-07, 2.9292999999999996e-07, 3.0303099999999996e-07, 3.1313199999999995e-07, 3.2323299999999994e-07, 3.3333399999999993e-07, 3.434349999999999e-07, 3.535359999999999e-07, 3.636369999999999e-07, 3.7373799999999995e-07, 3.8383899999999995e-07, 3.9393999999999994e-07, 4.0404099999999993e-07, 4.141419999999999e-07, 4.242429999999999e-07, 4.343439999999999e-07, 4.4444499999999995e-07, 4.5454599999999995e-07, 4.6464699999999994e-07, 4.7474799999999993e-07, 4.84849e-07, 4.9495e-07, 5.05051e-07, 5.15152e-07, 5.252529999999999e-07, 5.35354e-07, 5.454549999999999e-07, 5.55556e-07, 5.65657e-07, 5.75758e-07, 5.85859e-07, 5.959599999999999e-07, 6.06061e-07, 6.161619999999999e-07, 6.26263e-07, 6.363639999999999e-07, 6.46465e-07, 6.56566e-07, 6.666669999999999e-07, 6.76768e-07, 6.868689999999999e-07, 6.9697e-07, 7.070709999999999e-07, 7.17172e-07, 7.272729999999999e-07, 7.373739999999999e-07, 7.47475e-07, 7.575759999999999e-07, 7.67677e-07, 7.777779999999999e-07, 7.87879e-07, 7.979799999999999e-07, 8.080809999999999e-07, 8.18182e-07, 8.282829999999999e-07, 8.38384e-07, 8.484849999999999e-07, 8.58586e-07, 8.686869999999999e-07, 8.787879999999999e-07, 8.88889e-07, 8.989899999999999e-07, 9.09091e-07, 9.191919999999999e-07, 9.29293e-07, 9.393939999999999e-07, 9.494949999999999e-07, 9.59596e-07, 9.69697e-07, 9.797979999999999e-07, 9.89899e-07, 1e-06], "expected": [-2.1620882779830826, -3.8174665588862142, -3.8578357500199383, -3.17257672772789, -3.5687176614273284, -2.960602736900583, -2.8829719557428306, -3.0525996721539386, -3.568255756681463, -3.521122229400776, -3.5665234945570177, -2.688619243731962, -2.307213099119549, -2.1390712133679974, -2.3993889657408776, -2.6385483095394857, -3.5854860836351574, -2.516680550052526, -2.6061908286083946, -3.23648105148322, -2.2997617507171517, -2.9437776377807445, -2.213981862024644, -2.3588812502094045, -3.542842761199417, -2.358752061497264, -3.7228771497267323, -3.035065009651624, -3.7023788871548087, -3.10341189013639, -2.6680870551922484, -2.4219351496343773, -2.6759584838155313, -2.5769751422798985, -2.2241526757377867, -3.7166494175056726, -3.704859752897275, -3.3481383141001375, -3.936252340902651, -2.6244742107673344, -2.470539909519716, -3.299981162650516, -2.767984778663786, -2.0830002823651146, -3.417894766773279, -2.6266430749918372, -3.915543539436084, -3.8749927365595065, -2.3712026085972715, -3.1267632751494476, -3.2158631359038115, -3.3387046406733907, -3.084682343168848, -2.3292956954508437, -3.066462247600996, -3.157428024455016, -2.8582968941229536, -2.5218880866133397, -3.889833182811852, -2.751638701856317, -2.7578793446115655, -3.9977789363616694, -2.7942129871967794, -3.919629175801977, -2.8284992664346333, -3.103241150673428, -3.2925394647621613, -2.1329495312515325, -3.465488136483318, -3.4374012390722877, -2.9901880727086922, -2.7063877626489665, -2.0588531419526768, -3.928249041210237, -3.1536002677138084, -2.823375822660002, -2.5365954348890334, -3.648977854164295, -2.97892243078136, -2.9994308083211862, -2.214464736044474, -3.2346345849888927, -2.6742723263940587, -3.906376880595899, -2.497553432236649, -3.262429415328469, -2.103942726876051, -3.305549563651568, -2.6322136023060847, -2.350730236509408, -3.027494011527616, -2.0316482573470154, -2.79237192367349, -2.480750336029599, -2.6309666092674964, -2.135167545635726, -2.1004290569429784, -2.0197777438940587, -3.7476892338259415, -2.0467987654961624]} diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.js b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.js new file mode 100644 index 000000000000..cf6feb36fae4 --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.js @@ -0,0 +1,162 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); +var mean = require( './../lib' ); + + +// FIXTURES // + +var data = require( './fixtures/python/data.json' ); +var smallMu = require( './fixtures/python/small_mu.json' ); +var largeMu = require( './fixtures/python/large_mu.json' ); +var smallSigma = require( './fixtures/python/small_sigma.json' ); +var largeSigma = require( './fixtures/python/large_sigma.json' ); + + +// TESTS // + +tape( 'main export is a function', function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof mean, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the function returns `NaN`', function test( t ) { + var y = mean( NaN, 1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + y = mean( 1.0, NaN ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + t.end(); +}); + +tape( 'if provided a nonpositive `sigma`, the function returns `NaN`', function test( t ) { + var y; + + y = mean( 2.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mean( 2.0, -1.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mean( 1.0, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mean( PINF, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mean( NINF, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mean( NaN, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns the expected value of an Anglit distribution', function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = data.expected; + mu = data.mu; + sigma = data.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns the expected value for small `mu` values', function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = smallMu.expected; + mu = smallMu.mu; + sigma = smallMu.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns the expected value for large `mu` values', function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = largeMu.expected; + mu = largeMu.mu; + sigma = largeMu.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns the expected value for small `sigma` values', function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = smallSigma.expected; + mu = smallSigma.mu; + sigma = smallSigma.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns the expected value for large `sigma` values', function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = largeSigma.expected; + mu = largeSigma.mu; + sigma = largeSigma.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.native.js b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.native.js new file mode 100644 index 000000000000..983b566bb87d --- /dev/null +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/test/test.native.js @@ -0,0 +1,170 @@ +/** +* @license Apache-2.0 +* +* Copyright (c) 2026 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 resolve = require( 'path' ).resolve; +var tape = require( 'tape' ); +var tryRequire = require( '@stdlib/utils/try-require' ); +var isnan = require( '@stdlib/math/base/assert/is-nan' ); +var PINF = require( '@stdlib/constants/float64/pinf' ); +var NINF = require( '@stdlib/constants/float64/ninf' ); + + +// VARIABLES // + +var mean = tryRequire( resolve( __dirname, './../lib/native.js' ) ); +var opts = { + 'skip': ( mean instanceof Error ) +}; + + +// FIXTURES // + +var data = require( './fixtures/python/data.json' ); +var smallMu = require( './fixtures/python/small_mu.json' ); +var largeMu = require( './fixtures/python/large_mu.json' ); +var smallSigma = require( './fixtures/python/small_sigma.json' ); +var largeSigma = require( './fixtures/python/large_sigma.json' ); + + +// TESTS // + +tape( 'main export is a function', opts, function test( t ) { + t.ok( true, __filename ); + t.strictEqual( typeof mean, 'function', 'main export is a function' ); + t.end(); +}); + +tape( 'if provided `NaN` for any parameter, the function returns `NaN`', opts, function test( t ) { + var v = mean( NaN, 0.5 ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + v = mean( 10.0, NaN ); + t.strictEqual( isnan( v ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'if provided `sigma <= 0.0`, the function returns `NaN`', opts, function test( t ) { + var y; + + y = mean( 3.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mean( 0.0, 0.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mean( 2.0, -2.0 ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mean( NINF, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + y = mean( PINF, NINF ); + t.strictEqual( isnan( y ), true, 'returns expected value' ); + + t.end(); +}); + +tape( 'the function returns the expected value of an Anglit distribution', opts, function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = data.expected; + mu = data.mu; + sigma = data.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns the expected value for small `mu` values', opts, function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = smallMu.expected; + mu = smallMu.mu; + sigma = smallMu.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns the expected value for large `mu` values', opts, function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = largeMu.expected; + mu = largeMu.mu; + sigma = largeMu.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns the expected value for small `sigma` values', opts, function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = smallSigma.expected; + mu = smallSigma.mu; + sigma = smallSigma.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); + +tape( 'the function returns the expected value for large `sigma` values', opts, function test( t ) { + var expected; + var sigma; + var mu; + var y; + var i; + + expected = largeSigma.expected; + mu = largeSigma.mu; + sigma = largeSigma.sigma; + for ( i = 0; i < mu.length; i++ ) { + y = mean( mu[i], sigma[i] ); + t.strictEqual( y, expected[i], 'returns expected value' ); + } + t.end(); +}); From a8e8000effa9a7f446c37608340f0c31aa86f0bc Mon Sep 17 00:00:00 2001 From: Om-A-osc Date: Wed, 4 Mar 2026 00:58:23 +0530 Subject: [PATCH 2/2] fix: addressing first round comments --- 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: passed - 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: na - task: lint_r status: na - task: lint_c_src status: passed - 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: na - task: lint_license_headers status: passed --- --- .../@stdlib/stats/base/dists/anglit/mean/README.md | 6 +++--- .../@stdlib/stats/base/dists/anglit/mean/docs/repl.txt | 1 + .../@stdlib/stats/base/dists/anglit/mean/src/main.c | 6 +++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/README.md b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/README.md index f803162859b1..c43104cd4b67 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/README.md @@ -26,7 +26,7 @@ limitations under the License.
-The [mean][mean] for a [Anglit][anglit-distribution] random variable with location parameter `mu` and scale parameter `sigma` is +The [mean][mean] for an [Anglit][anglit-distribution] random variable with location parameter `mu` and scale parameter `sigma` is @@ -52,7 +52,7 @@ var mean = require( '@stdlib/stats/base/dists/anglit/mean' ); #### mean( mu, sigma ) -Returns the [expected value][mean] for a [Anglit][anglit-distribution] distribution with location parameter `mu` and scale parameter `sigma`. +Returns the [expected value][mean] for an [Anglit][anglit-distribution] distribution with location parameter `mu` and scale parameter `sigma`. ```javascript var y = mean( 2.0, 1.0 ); @@ -151,7 +151,7 @@ logEachMap( 'µ: %lf, sigma: %lf, E(X;µ,sigma): %lf', mu, sigma, mean ); #### stdlib_base_dists_anglit_mean( mu, sigma ) -Returns the [expected value][mean] for a [Anglit][anglit-distribution] distribution with location parameter `mu` and scale parameter `sigma`. +Returns the [expected value][mean] for an [Anglit][anglit-distribution] distribution with location parameter `mu` and scale parameter `sigma`. ```c double out = stdlib_base_dists_anglit_mean( 2.0, 1.0 ); diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/repl.txt b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/repl.txt index f311c0f0f776..c14aa6695dbe 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/repl.txt +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/docs/repl.txt @@ -35,3 +35,4 @@ See Also -------- + diff --git a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/main.c b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/main.c index bf712d956748..1fea49e72e50 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/main.c +++ b/lib/node_modules/@stdlib/stats/base/dists/anglit/mean/src/main.c @@ -22,9 +22,9 @@ /** * Returns the expected value for an Anglit distribution with location `mu` and scale `sigma`. * -* @param mu location parameter -* @param sigma scale parameter -* @return expected value +* @param mu location parameter +* @param sigma scale parameter +* @return expected value * * @example * double y = stdlib_base_dists_anglit_mean( 0.0, 1.0 );