Skip to content

Commit 41606e2

Browse files
authored
docs: fix README structure of stats/base/dists/chi/cdf
PR-URL: #11740 Reviewed-by: Athan Reines <kgryte@gmail.com>
1 parent 57e6e8b commit 41606e2

1 file changed

Lines changed: 36 additions & 28 deletions

File tree

  • lib/node_modules/@stdlib/stats/base/dists/chi/cdf

lib/node_modules/@stdlib/stats/base/dists/chi/cdf/README.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,42 @@ y = mycdf( 1.5 );
121121
// returns ~0.478
122122
```
123123

124+
</section>
125+
126+
<!-- /.usage -->
127+
128+
<section class="examples">
129+
130+
## Examples
131+
132+
<!-- eslint no-undef: "error" -->
133+
134+
```javascript
135+
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
136+
var uniform = require( '@stdlib/random/array/uniform' );
137+
var logEachMap = require( '@stdlib/console/log-each-map' );
138+
var cdf = require( '@stdlib/stats/base/dists/chi/cdf' );
139+
140+
var opts = {
141+
'dtype': 'float64'
142+
};
143+
var x = uniform( 20, 0.0, 10.0, opts );
144+
var k = discreteUniform( 20, 0, 10, opts );
145+
146+
logEachMap( 'x: %0.4f, k: %d, F(x;k): %0.4f', x, k, cdf );
147+
```
148+
149+
</section>
150+
151+
<!-- /.examples -->
152+
153+
<!-- C interface documentation. -->
154+
124155
* * *
125156

126-
### C APIs
157+
<section class="c">
158+
159+
## C APIs
127160

128161
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
129162

@@ -137,7 +170,7 @@ y = mycdf( 1.5 );
137170

138171
<section class="usage">
139172

140-
#### Usage
173+
### Usage
141174

142175
```c
143176
#include "stdlib/stats/base/dists/chi/cdf.h"
@@ -213,32 +246,7 @@ int main( void ) {
213246

214247
</section>
215248

216-
<!-- /.usage -->
217-
218-
<section class="examples">
219-
220-
## Examples
221-
222-
<!-- eslint no-undef: "error" -->
223-
224-
```javascript
225-
var discreteUniform = require( '@stdlib/random/array/discrete-uniform' );
226-
var uniform = require( '@stdlib/random/array/uniform' );
227-
var logEachMap = require( '@stdlib/console/log-each-map' );
228-
var cdf = require( '@stdlib/stats/base/dists/chi/cdf' );
229-
230-
var opts = {
231-
'dtype': 'float64'
232-
};
233-
var x = uniform( 20, 0.0, 10.0, opts );
234-
var k = discreteUniform( 20, 0, 10, opts );
235-
236-
logEachMap( 'x: %0.4f, k: %d, F(x;k): %0.4f', x, k, cdf );
237-
```
238-
239-
</section>
240-
241-
<!-- /.examples -->
249+
<!-- /.c -->
242250

243251
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
244252

0 commit comments

Comments
 (0)