From d8f2053f665d68474fe9ea0ca8e76ea2d6411bb7 Mon Sep 17 00:00:00 2001 From: Paul BIGNIER Date: Wed, 13 Nov 2013 17:14:02 +0100 Subject: [PATCH] Statistics: clearer warning message for variance Follow-up on commit https://codereview.scilab.org/#/c/13009/ , warning message was unclear. Change-Id: Ie63d2559af7094eb33666778bd91a66a39b402e7 --- scilab/modules/statistics/macros/variance.sci | 4 ++-- .../statistics/tests/nonreg_tests/bug_7858.dia.ref | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scilab/modules/statistics/macros/variance.sci b/scilab/modules/statistics/macros/variance.sci index 5081355..c100349 100644 --- a/scilab/modules/statistics/macros/variance.sci +++ b/scilab/modules/statistics/macros/variance.sci @@ -99,8 +99,8 @@ function [s, m] = variance(x, orien, m) else if isscalar(m) then if or(m==[0 1]) then - tmp = _("%s: The use of input argument ''%s'' is now obsolete, please use ''%s'' instead.\n") - warning(msprintf(tmp, "variance", "w", "m")) + tmp = _("%s: The significance of input argument #%d has been modified. Please refer to the variance help page.\n") + warning(msprintf(tmp, "variance", 3)) end // If m is a scalar, extend it to the size of x. // If lhs==1, we do not need to perform this operation, because in the following 'x - m', m can be a scalar diff --git a/scilab/modules/statistics/tests/nonreg_tests/bug_7858.dia.ref b/scilab/modules/statistics/tests/nonreg_tests/bug_7858.dia.ref index e3a1a1e..4adf710 100644 --- a/scilab/modules/statistics/tests/nonreg_tests/bug_7858.dia.ref +++ b/scilab/modules/statistics/tests/nonreg_tests/bug_7858.dia.ref @@ -29,7 +29,7 @@ expectedV = [1.07 1.26]/3; assert_checkalmostequal([Variance Mean], [expectedV expectedM]); // With a scalar [Variance, Mean] = variance( x, orien, 1 ); -WARNING: variance: The use of input argument 'w' is now obsolete, please use 'm' instead. +WARNING: variance: The significance of input argument #3 has been modified. Please refer to the variance help page. assert_checkalmostequal([Variance Mean], [expectedV expectedM]); orien = "c"; expectedM = [1; 1; 1]; @@ -39,7 +39,7 @@ expectedV = [0.05; 0.81; 0.305]; assert_checkalmostequal([Variance Mean], [expectedV expectedM]); // With a scalar [Variance, Mean] = variance( x, orien, 1 ); -WARNING: variance: The use of input argument 'w' is now obsolete, please use 'm' instead. +WARNING: variance: The significance of input argument #3 has been modified. Please refer to the variance help page. assert_checkalmostequal([Variance Mean], [expectedV expectedM]); //-------------------------------------------------------------- // Variancef -- 1.7.9.5