Skip to content

Commit b148327

Browse files
committed
fix(nanmcv): fix tests
--- 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: na - task: lint_package_json status: na - task: lint_repl_help status: na - 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 6b9a682 commit b148327

File tree

1 file changed

+118
-118
lines changed
  • lib/node_modules/@stdlib/stats/incr/nanmcv/test

1 file changed

+118
-118
lines changed

lib/node_modules/@stdlib/stats/incr/nanmcv/test/test.js

Lines changed: 118 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -310,46 +310,46 @@ tape( 'if provided `NaN`, the value is ignored (unknown mean)', function test( t
310310

311311
data = [
312312
NaN,
313-
3.14,
314-
3.14,
313+
3.2,
314+
3.0,
315315
NaN,
316-
3.14,
317-
3.14,
318-
3.14,
316+
1.66,
317+
2.72,
318+
1.41,
319319
NaN,
320-
3.14,
321-
3.14,
322-
3.14,
320+
3.8,
321+
10.0,
322+
1.5,
323323
NaN,
324-
3.14,
325-
3.14,
324+
1.71,
325+
3.66,
326326
NaN,
327327
NaN,
328328
NaN,
329329
NaN,
330-
3.14
330+
3.0
331331
];
332332

333333
expected = [
334-
null,
335-
0.0,
336-
0.0,
337-
0.0,
338-
0.0,
339-
0.0,
340-
0.0,
341-
0.0,
342-
0.0,
343-
0.0,
344-
0.0,
345-
0.0,
346-
0.0,
347-
0.0,
348-
0.0,
349-
0.0,
350-
0.0,
351-
0.0,
352-
0.0
334+
null, // []
335+
0.000000, // [3.2]
336+
0.045619792334616015, // [3.2, 3.0]
337+
0.045619792334616015, // [3.2, 3.0] (NaN ignored, window unchanged)
338+
0.31960948725890576, // [3.2, 3.0, 1.66]
339+
0.28732678125320804, // [3.0, 1.66, 2.72]
340+
0.360355151282696, // [1.66, 2.72, 1.41]
341+
0.360355151282696, // [1.66, 2.72, 1.41] (NaN ignored)
342+
0.4527779582477939, // [2.72, 1.41, 3.8]
343+
0.8744748938856596, // [1.41, 3.8, 10.0]
344+
0.8620763896855141, // [3.8, 10.0, 1.5]
345+
0.8620763896855141, // [3.8, 10.0, 1.5] (NaN ignored)
346+
1.1009824477893335, // [10.0, 1.5, 1.71]
347+
0.5201274829686575, // [1.5, 1.71, 3.66]
348+
0.5201274829686575, // [1.5, 1.71, 3.66] (NaN ignored)
349+
0.5201274829686575, // [1.5, 1.71, 3.66] (NaN ignored)
350+
0.5201274829686575, // [1.5, 1.71, 3.66] (NaN ignored)
351+
0.5201274829686575, // [1.5, 1.71, 3.66] (NaN ignored)
352+
0.35548979042616236 // [1.71, 3.66, 3.0]
353353
];
354354

355355
for ( i = 0; i < data.length; i++ ) {
@@ -377,45 +377,45 @@ tape( 'if provided `NaN`, the value is ignored (known mean)', function test( t )
377377
data = [
378378
NaN,
379379
3.14,
380-
3.14,
380+
2.5,
381381
NaN,
382-
3.14,
383-
3.14,
384-
3.14,
382+
4.0,
383+
5.5,
384+
3.0,
385385
NaN,
386-
3.14,
387-
3.14,
388-
3.14,
386+
2.2,
387+
7.7,
388+
4.4,
389389
NaN,
390-
3.14,
391-
3.14,
390+
3.3,
391+
6.6,
392392
NaN,
393393
NaN,
394394
NaN,
395395
NaN,
396-
3.14
396+
3.9
397397
];
398398

399399
expected = [
400-
null,
401-
0.0,
402-
0.0,
403-
0.0,
404-
0.0,
405-
0.0,
406-
0.0,
407-
0.0,
408-
0.0,
409-
0.0,
410-
0.0,
411-
0.0,
412-
0.0,
413-
0.0,
414-
0.0,
415-
0.0,
416-
0.0,
417-
0.0,
418-
0.0
400+
null, // []
401+
0.000000, // [3.14]
402+
0.1441236751463027, // [3.14, 2.5]
403+
0.1441236751463027, // [3.14, 2.5] (NaN ignored)
404+
0.19710948953515298, // [3.14, 2.5, 4.0]
405+
0.47660169366956523, // [2.5, 4.0, 5.5]
406+
0.4625624880347849, // [4.0, 5.5, 3.0]
407+
0.4625624880347849, // [4.0, 5.5, 3.0] (NaN ignored)
408+
0.4677952618338482, // [5.5, 3.0, 2.2]
409+
0.856460952268003, // [3.0, 2.2, 7.7]
410+
0.8868688195149519, // [2.2, 7.7, 4.4]
411+
0.8868688195149519, // [2.2, 7.7, 4.4] (NaN ignored)
412+
0.8703614427753308, // [7.7, 4.4, 3.3]
413+
0.6776982264009902, // [4.4, 3.3, 6.6]
414+
0.6776982264009902, // [4.4, 3.3, 6.6] (NaN ignored)
415+
0.6776982264009902, // [4.4, 3.3, 6.6] (NaN ignored)
416+
0.6776982264009902, // [4.4, 3.3, 6.6] (NaN ignored)
417+
0.6776982264009902, // [4.4, 3.3, 6.6] (NaN ignored)
418+
0.6520190246234627 // [3.3, 6.6, 3.9]
419419
];
420420

421421
for ( i = 0; i < data.length; i++ ) {
@@ -442,46 +442,46 @@ tape( 'if provided `NaN`, the value is ignored (unknown mean, W=1)', function te
442442

443443
data = [
444444
NaN,
445-
3.14,
446-
3.14,
445+
2.0,
446+
3.5,
447447
NaN,
448-
3.14,
449-
3.14,
450-
3.14,
448+
4.2,
449+
3.3,
450+
5.5,
451451
NaN,
452-
3.14,
453-
3.14,
454-
3.14,
452+
1.1,
453+
2.2,
454+
6.6,
455455
NaN,
456-
3.14,
457-
3.14,
456+
7.7,
457+
8.8,
458458
NaN,
459459
NaN,
460460
NaN,
461461
NaN,
462-
3.14
462+
9.9
463463
];
464464

465465
expected = [
466-
null,
467-
0.0,
468-
0.0,
469-
0.0,
470-
0.0,
471-
0.0,
472-
0.0,
473-
0.0,
474-
0.0,
475-
0.0,
476-
0.0,
477-
0.0,
478-
0.0,
479-
0.0,
480-
0.0,
481-
0.0,
482-
0.0,
483-
0.0,
484-
0.0
466+
null, // []
467+
0.000000, // [2.0]
468+
0.000000, // [3.5]
469+
0.000000, // [3.5] (NaN ignored)
470+
0.000000, // [4.2]
471+
0.000000, // [3.3]
472+
0.000000, // [5.5]
473+
0.000000, // [5.5] (NaN ignored)
474+
0.000000, // [1.1]
475+
0.000000, // [2.2]
476+
0.000000, // [6.6]
477+
0.000000, // [6.6] (NaN ignored)
478+
0.000000, // [7.7]
479+
0.000000, // [8.8]
480+
0.000000, // [8.8] (NaN ignored)
481+
0.000000, // [8.8] (NaN ignored)
482+
0.000000, // [8.8] (NaN ignored)
483+
0.000000, // [8.8] (NaN ignored)
484+
0.000000 // [9.9]
485485
];
486486

487487
for ( i = 0; i < data.length; i++ ) {
@@ -509,45 +509,45 @@ tape( 'if provided `NaN`, the value is ignored (known mean, W=1)', function test
509509
data = [
510510
NaN,
511511
3.14,
512-
3.14,
512+
4.0,
513513
NaN,
514-
3.14,
515-
3.14,
516-
3.14,
514+
2.0,
515+
5.0,
516+
6.0,
517517
NaN,
518-
3.14,
519-
3.14,
520-
3.14,
518+
3.5,
519+
2.5,
520+
1.5,
521521
NaN,
522-
3.14,
523-
3.14,
522+
4.5,
523+
5.5,
524524
NaN,
525525
NaN,
526526
NaN,
527527
NaN,
528-
3.14
528+
2.2
529529
];
530530

531531
expected = [
532-
null,
533-
0.0,
534-
0.0,
535-
0.0,
536-
0.0,
537-
0.0,
538-
0.0,
539-
0.0,
540-
0.0,
541-
0.0,
542-
0.0,
543-
0.0,
544-
0.0,
545-
0.0,
546-
0.0,
547-
0.0,
548-
0.0,
549-
0.0,
550-
0.0
532+
null, // []
533+
0.000000, // [3.14]
534+
0.2738853503184713, // [4.0]
535+
0.2738853503184713, // [4.0] (NaN ignored)
536+
0.36305732484076436, // [2.0]
537+
0.5923566878980892, // [5.0]
538+
0.9108280254777069, // [6.0]
539+
0.9108280254777069, // [6.0] (NaN ignored)
540+
0.1146496815286624, // [3.5]
541+
0.20382165605095545, // [2.5]
542+
0.5222929936305732, // [1.5]
543+
0.5222929936305732, // [1.5] (NaN ignored)
544+
0.4331210191082802, // [4.5]
545+
0.751592356687898, // [5.5]
546+
0.751592356687898, // [5.5] (NaN ignored)
547+
0.751592356687898, // [5.5] (NaN ignored)
548+
0.751592356687898, // [5.5] (NaN ignored)
549+
0.751592356687898, // [5.5] (NaN ignored)
550+
0.29936305732484053 // [2.2]
551551
];
552552

553553
for ( i = 0; i < data.length; i++ ) {

0 commit comments

Comments
 (0)