Skip to content

Commit 7e40186

Browse files
committed
docs: co-locate JS examples with JS API documentation in stats/base/dists/gamma/logcdf
Moved the JS `## Examples` section to sit between the JS `## Usage` section and the `## C APIs` section, matching the namespace majority ordering (10/14 siblings) and addressing review feedback that JS examples should be co-located with the documentation for the JS APIs rather than placed after the C interface documentation. No content changes; section ordering only.
1 parent 0b67229 commit 7e40186

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

  • lib/node_modules/@stdlib/stats/base/dists/gamma/logcdf

lib/node_modules/@stdlib/stats/base/dists/gamma/logcdf/README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,31 @@ y = mylogcdf( 4.0 );
129129

130130
<!-- /.usage -->
131131

132+
<section class="examples">
133+
134+
## Examples
135+
136+
<!-- eslint no-undef: "error" -->
137+
138+
```javascript
139+
var uniform = require( '@stdlib/random/array/uniform' );
140+
var logEachMap = require( '@stdlib/console/log-each-map' );
141+
var logcdf = require( '@stdlib/stats/base/dists/gamma/logcdf' );
142+
143+
var opts = {
144+
'dtype': 'float64'
145+
};
146+
var x = uniform( 10, 0.0, 3.0, opts );
147+
var alpha = uniform( 10, 0.0, 5.0, opts );
148+
var beta = uniform( 10, 0.0, 5.0, opts );
149+
150+
logEachMap( 'x: %0.4f, α: %0.4f, β: %0.4f, ln(f(x;α,β)): %0.4f', x, alpha, beta, logcdf );
151+
```
152+
153+
</section>
154+
155+
<!-- /.examples -->
156+
132157
<!-- C interface documentation. -->
133158

134159
* * *
@@ -230,31 +255,6 @@ int main( void ) {
230255

231256
<!-- /.c -->
232257

233-
<section class="examples">
234-
235-
## Examples
236-
237-
<!-- eslint no-undef: "error" -->
238-
239-
```javascript
240-
var uniform = require( '@stdlib/random/array/uniform' );
241-
var logEachMap = require( '@stdlib/console/log-each-map' );
242-
var logcdf = require( '@stdlib/stats/base/dists/gamma/logcdf' );
243-
244-
var opts = {
245-
'dtype': 'float64'
246-
};
247-
var x = uniform( 10, 0.0, 3.0, opts );
248-
var alpha = uniform( 10, 0.0, 5.0, opts );
249-
var beta = uniform( 10, 0.0, 5.0, opts );
250-
251-
logEachMap( 'x: %0.4f, α: %0.4f, β: %0.4f, ln(f(x;α,β)): %0.4f', x, alpha, beta, logcdf );
252-
```
253-
254-
</section>
255-
256-
<!-- /.examples -->
257-
258258
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
259259

260260
<section class="related">

0 commit comments

Comments
 (0)