Skip to content

Commit c3fcf4d

Browse files
Aadish JainAadish Jain
authored andcommitted
feat(t-mode): fixing readme and test.native.js
1 parent 83c2e14 commit c3fcf4d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

lib/node_modules/@stdlib/stats/base/dists/t/mode/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ for ( i = 0; i < 10; i++ ) {
142142

143143
#### stdlib_base_dists_t_mode( v )
144144

145-
Evaluates the mode for a Student's t-distribution.
145+
Returns the [mode][mode] of a [Student's t][t-distribution] distribution with degrees of freedom `v`.
146146

147147
```c
148148
double out = stdlib_base_dists_t_mode( 5.0 );
@@ -151,7 +151,7 @@ double out = stdlib_base_dists_t_mode( 5.0 );
151151

152152
The function accepts the following arguments:
153153

154-
- **v**: `[in] double` input value.
154+
- **v**: `[in] double` degrees of freedom.
155155

156156
```c
157157
double stdlib_base_dists_t_mode( const double v );

lib/node_modules/@stdlib/stats/base/dists/t/mode/test/test.native.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,39 +33,39 @@ var data = require( './fixtures/julia/data.json' );
3333

3434
// VARIABLES //
3535

36-
var median = tryRequire( resolve( __dirname, './../lib/native.js' ) );
36+
var mode = tryRequire( resolve( __dirname, './../lib/native.js' ) );
3737
var opts = {
38-
'skip': ( median instanceof Error )
38+
'skip': ( mode instanceof Error )
3939
};
4040

4141

4242
// TESTS //
4343

4444
tape( 'main export is a function', opts, function test( t ) {
4545
t.ok( true, __filename );
46-
t.strictEqual( typeof median, 'function', 'main export is a function' );
46+
t.strictEqual( typeof mode, 'function', 'main export is a function' );
4747
t.end();
4848
});
4949

5050
tape( 'if provided `NaN` for the parameter, the function returns `NaN`', opts, function test( t ) {
51-
var y = median( NaN );
51+
var y = mode( NaN );
5252
t.equal( isnan( y ), true, 'returns NaN' );
5353
t.end();
5454
});
5555

5656
tape( 'if provided a negative value for `v`, the function returns `NaN`', opts, function test( t ) {
5757
var y;
5858

59-
y = median( -1.0 );
59+
y = mode( -1.0 );
6060
t.equal( isnan( y ), true, 'returns NaN' );
6161

62-
y = median( -0.5 );
62+
y = mode( -0.5 );
6363
t.equal( isnan( y ), true, 'returns NaN' );
6464

6565
t.end();
6666
});
6767

68-
tape( 'the function evaluates the median for a Student\'s t-distribution', opts, function test( t ) {
68+
tape( 'the function evaluates the mode for a Student\'s t-distribution', opts, function test( t ) {
6969
var expected;
7070
var v;
7171
var y;
@@ -74,7 +74,7 @@ tape( 'the function evaluates the median for a Student\'s t-distribution', opts,
7474
for ( i = 0; i < data.v.length; i++ ) {
7575
v = data.v[ i ];
7676
expected = data.expected[ i ];
77-
y = median( v );
77+
y = mode( v );
7878
t.equal( y, expected, 'v: ' + v + ', y: ' + y + ', expected: ' + expected );
7979
}
8080
t.end();

0 commit comments

Comments
 (0)