Skip to content

Commit 2203ea8

Browse files
authored
fix: made the required changes that were asked.
1. fixed the space before the outer paranthesis 2. corrected the title of the test cases which handles NaN inputs.
1 parent 88f48b9 commit 2203ea8

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/node_modules/@stdlib/stats/incr/nanmmape/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function incrnanmmape( W ) {
7373
* @returns {(number|null)} mean absolute percentage error or null
7474
*/
7575
function accumulator( f, a ) {
76-
if ( arguments.length === 0 || isnan( f ) || isnan( a )) {
76+
if ( arguments.length === 0 || isnan( f ) || isnan( a ) ) {
7777
return mmape();
7878
}
7979
return mmape( f, a );

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ tape( 'if data has yet to be provided, the accumulator function returns `null`',
138138
t.end();
139139
});
140140

141-
tape( 'if provided `NaN`, the accumulated value is `NaN` for at least `W` invocations', function test( t ) {
141+
tape( 'if provided `NaN`, the accumulated function ignore it (returns the current mean absolute percentage error)', function test( t ) {
142142
var expected;
143143
var data;
144144
var acc;

0 commit comments

Comments
 (0)