From 55dcad17c72584524c416dcde1fce0993c8b3ddc Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Apr 2026 08:44:36 +0000 Subject: [PATCH] style: align `stats/base/dists/chi/cdf` README with namespace conventions Restructured the README so the C APIs block is a top-level section after the JavaScript Examples, matching the pattern followed by 9/10 native-addon siblings in `stats/base/dists/chi`. Closes the outer `
` after the `cdf.factory` subsection, adds the JavaScript `## Examples` section, then wraps the C APIs in `
` with `## C APIs` (previously `### C APIs`, nested inside the JS usage section) and promotes the C `### Usage` heading from `#### Usage` to match the majority conformance (90% of sibling native-addon packages). Docs-only change; no source, tests, examples, or public API affected. https://claude.ai/code/session_01FXfscMHk9EUo3WE1FJswD5 --- .../stats/base/dists/chi/cdf/README.md | 64 +++++++++++-------- 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/lib/node_modules/@stdlib/stats/base/dists/chi/cdf/README.md b/lib/node_modules/@stdlib/stats/base/dists/chi/cdf/README.md index fcc54cb1f23d..721931fd1569 100644 --- a/lib/node_modules/@stdlib/stats/base/dists/chi/cdf/README.md +++ b/lib/node_modules/@stdlib/stats/base/dists/chi/cdf/README.md @@ -121,9 +121,42 @@ y = mycdf( 1.5 ); // returns ~0.478 ``` +
+ + + +
+ +## Examples + + + +```javascript +var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); +var uniform = require( '@stdlib/random/array/uniform' ); +var logEachMap = require( '@stdlib/console/log-each-map' ); +var cdf = require( '@stdlib/stats/base/dists/chi/cdf' ); + +var opts = { + 'dtype': 'float64' +}; +var x = uniform( 20, 0.0, 10.0, opts ); +var k = discreteUniform( 20, 0, 10, opts ); + +logEachMap( 'x: %0.4f, k: %d, F(x;k): %0.4f', x, k, cdf ); +``` + +
+ + + + + * * * -### C APIs +
+ +## C APIs @@ -137,7 +170,7 @@ y = mycdf( 1.5 );
-#### Usage +### Usage ```c #include "stdlib/stats/base/dists/chi/cdf.h" @@ -213,32 +246,7 @@ int main( void ) {
- - -
- -## Examples - - - -```javascript -var discreteUniform = require( '@stdlib/random/array/discrete-uniform' ); -var uniform = require( '@stdlib/random/array/uniform' ); -var logEachMap = require( '@stdlib/console/log-each-map' ); -var cdf = require( '@stdlib/stats/base/dists/chi/cdf' ); - -var opts = { - 'dtype': 'float64' -}; -var x = uniform( 20, 0.0, 10.0, opts ); -var k = discreteUniform( 20, 0, 10, opts ); - -logEachMap( 'x: %0.4f, k: %d, F(x;k): %0.4f', x, k, cdf ); -``` - -
- - +