Skip to content

Commit b0c70d4

Browse files
committed
chore: clean-up
--- 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: passed - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - 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 ---
1 parent 42a21ef commit b0c70d4

7 files changed

Lines changed: 10 additions & 82 deletions

File tree

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ limitations under the License.
2020

2121
# Mode
2222

23-
> [half-normal][half-normal-distribution] distribution [mode][mode].
23+
> [Half-normal][half-normal-distribution] distribution [mode][mode].
2424
2525
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
2626

@@ -67,7 +67,7 @@ y = mode( 2.0 );
6767
// returns 0.0
6868
```
6969

70-
If provided `NaN` as any argument, the function returns `NaN`.
70+
If provided `NaN`, the function returns `NaN`.
7171

7272
```javascript
7373
var y = mode( NaN );

lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/docs/repl.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{alias}}( σ )
33
Returns the mode of a half-normal distribution with scale parameter `σ`.
44

5-
If provided `NaN` as any argument, the function returns `NaN`.
5+
If provided `NaN`, the function returns `NaN`.
66

77
If provided `σ <= 0`, the function returns `NaN`.
88

lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/test/fixtures/julia/REQUIRE

Lines changed: 0 additions & 3 deletions
This file was deleted.

lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/test/fixtures/julia/data.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/node_modules/@stdlib/stats/base/dists/halfnormal/mode/test/fixtures/julia/runner.jl

Lines changed: 0 additions & 55 deletions
This file was deleted.

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

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,10 @@
2323
var tape = require( 'tape' );
2424
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2525
var NINF = require( '@stdlib/constants/float64/ninf' );
26+
var uniform = require( '@stdlib/random/array/uniform' );
2627
var mode = require( './../lib' );
2728

2829

29-
// FIXTURES //
30-
31-
var data = require( './fixtures/julia/data.json' );
32-
33-
3430
// TESTS //
3531

3632
tape( 'main export is a function', function test( t ) {
@@ -61,17 +57,14 @@ tape( 'if provided a nonpositive `sigma`, the function returns `NaN`', function
6157
});
6258

6359
tape( 'the function returns the mode of a half-normal distribution', function test( t ) {
64-
var expected;
6560
var sigma;
6661
var y;
6762
var i;
6863

69-
expected = data.expected;
70-
sigma = data.sigma;
71-
64+
sigma = uniform( 100, 0.1, 100.0 );
7265
for ( i = 0; i < sigma.length; i++ ) {
7366
y = mode( sigma[i] );
74-
t.strictEqual( y, expected[i], 'sigma: '+sigma[i] );
67+
t.strictEqual( y, 0.0, 'returns expected value' );
7568
}
7669
t.end();
7770
});

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

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,10 @@
2222

2323
var resolve = require( 'path' ).resolve;
2424
var tape = require( 'tape' );
25-
var tryRequire = require( '@stdlib/utils/try-require' );
2625
var isnan = require( '@stdlib/math/base/assert/is-nan' );
2726
var NINF = require( '@stdlib/constants/float64/ninf' );
28-
29-
30-
// FIXTURES //
31-
32-
var data = require( './fixtures/julia/data.json' );
27+
var uniform = require( '@stdlib/random/array/uniform' );
28+
var tryRequire = require( '@stdlib/utils/try-require' );
3329

3430

3531
// VARIABLES //
@@ -70,16 +66,14 @@ tape( 'if provided a nonpositive `sigma`, the function returns `NaN`', opts, fun
7066
});
7167

7268
tape( 'the function returns the mode of a half-normal distribution', opts, function test( t ) {
73-
var expected;
7469
var sigma;
7570
var y;
7671
var i;
7772

78-
expected = data.expected;
79-
sigma = data.sigma;
73+
sigma = uniform( 100, 0.1, 100.0 );
8074
for ( i = 0; i < sigma.length; i++ ) {
8175
y = mode( sigma[i] );
82-
t.strictEqual( y, expected[i], 'sigma: '+sigma[i] );
76+
t.strictEqual( y, 0.0, 'returns expected value' );
8377
}
8478
t.end();
8579
});

0 commit comments

Comments
 (0)